home *** CD-ROM | disk | FTP | other *** search
Text File | 2010-05-14 | 120.3 KB | 3,989 lines |
- package mx.core
- {
- import flash.display.DisplayObject;
- import flash.display.DisplayObjectContainer;
- import flash.display.GradientType;
- import flash.display.Graphics;
- import flash.display.InteractiveObject;
- import flash.display.Sprite;
- import flash.events.Event;
- import flash.events.EventPhase;
- import flash.events.FocusEvent;
- import flash.events.IEventDispatcher;
- import flash.events.KeyboardEvent;
- import flash.geom.Matrix;
- import flash.geom.Point;
- import flash.geom.Rectangle;
- import flash.system.ApplicationDomain;
- import flash.text.TextLineMetrics;
- import flash.utils.getQualifiedClassName;
- import flash.utils.getQualifiedSuperclassName;
- import mx.automation.IAutomationObject;
- import mx.binding.BindingManager;
- import mx.effects.Effect;
- import mx.effects.EffectInstance;
- import mx.effects.EffectManager;
- import mx.events.ChildExistenceChangedEvent;
- import mx.events.DynamicEvent;
- import mx.events.EffectEvent;
- import mx.events.FlexEvent;
- import mx.events.MoveEvent;
- import mx.events.PropertyChangeEvent;
- import mx.events.ResizeEvent;
- import mx.events.StateChangeEvent;
- import mx.events.ValidationResultEvent;
- import mx.graphics.RoundedRectangle;
- import mx.managers.IFocusManager;
- import mx.managers.IFocusManagerComponent;
- import mx.managers.IFocusManagerContainer;
- import mx.managers.ILayoutManagerClient;
- import mx.managers.ISystemManager;
- import mx.managers.IToolTipManagerClient;
- import mx.managers.SystemManager;
- import mx.managers.SystemManagerGlobals;
- import mx.managers.ToolTipManager;
- import mx.modules.ModuleManager;
- import mx.resources.ResourceBundle;
- import mx.skins.ProgrammaticSkin;
- import mx.states.State;
- import mx.states.Transition;
- import mx.styles.CSSStyleDeclaration;
- import mx.styles.ISimpleStyleClient;
- import mx.styles.IStyleClient;
- import mx.styles.StyleManager;
- import mx.styles.StyleProtoChain;
- import mx.utils.ColorUtil;
- import mx.utils.GraphicsUtil;
- import mx.utils.StringUtil;
- import mx.validators.IValidatorListener;
- import mx.validators.ValidationResult;
-
- use namespace mx_internal;
-
- public class UIComponent extends FlexSprite implements IAutomationObject, IChildList, IDeferredInstantiationUIComponent, IFlexDisplayObject, IFlexModule, IInvalidating, ILayoutManagerClient, IPropertyChangeNotifier, IRepeaterClient, ISimpleStyleClient, IStyleClient, IToolTipManagerClient, IUIComponent, IValidatorListener
- {
- mx_internal static var dispatchEventHook:Function;
-
- mx_internal static var createAccessibilityImplementation:Function;
-
- mx_internal static const VERSION:String = "2.0.1.0";
-
- public static const DEFAULT_MEASURED_WIDTH:Number = 160;
-
- public static const DEFAULT_MEASURED_MIN_WIDTH:Number = 40;
-
- public static const DEFAULT_MEASURED_HEIGHT:Number = 22;
-
- public static const DEFAULT_MEASURED_MIN_HEIGHT:Number = 22;
-
- public static const DEFAULT_MAX_WIDTH:Number = 10000;
-
- public static const DEFAULT_MAX_HEIGHT:Number = 10000;
-
- mx_internal static var STYLE_UNINITIALIZED:Object = {};
-
- private static var fakeMouseX:QName = new QName(mx_internal,"_mouseX");
-
- private static var fakeMouseY:QName = new QName(mx_internal,"_mouseY");
-
- private var errorStringChanged:Boolean = false;
-
- mx_internal var overlay:UIComponent;
-
- mx_internal var automaticRadioButtonGroups:Object;
-
- private var _currentState:String;
-
- private var _isPopUp:Boolean;
-
- private var _repeaters:Array;
-
- private var packageResources:ResourceBundle;
-
- private var _systemManager:ISystemManager;
-
- private var _measuredWidth:Number = 0;
-
- private var methodQueue:Array;
-
- mx_internal var _width:Number;
-
- private var _tweeningProperties:Array;
-
- private var _validationSubField:String;
-
- private var _endingEffectInstances:Array;
-
- mx_internal var saveBorderColor:Boolean = true;
-
- mx_internal var overlayColor:uint;
-
- private var _repeaterIndices:Array;
-
- private var oldExplicitWidth:Number;
-
- mx_internal var _descriptor:UIComponentDescriptor;
-
- private var _initialized:Boolean = false;
-
- private var requestedCurrentState:String;
-
- private var _focusEnabled:Boolean = true;
-
- private var cacheAsBitmapCount:int = 0;
-
- mx_internal var overlayReferenceCount:int = 0;
-
- private var listeningForRender:Boolean = false;
-
- mx_internal var invalidateDisplayListFlag:Boolean = false;
-
- private var oldScaleX:Number = 1;
-
- private var oldScaleY:Number = 1;
-
- mx_internal var _explicitMaxHeight:Number;
-
- mx_internal var invalidatePropertiesFlag:Boolean = false;
-
- private var hasFocusRect:Boolean = false;
-
- private var _scaleX:Number = 1;
-
- private var _scaleY:Number = 1;
-
- mx_internal var invalidateSizeFlag:Boolean = false;
-
- private var _styleDeclaration:CSSStyleDeclaration;
-
- mx_internal var _documentDescriptor:UIComponentDescriptor;
-
- mx_internal var _affectedProperties:Object;
-
- private var _processedDescriptors:Boolean = false;
-
- mx_internal var origBorderColor:Number;
-
- private var _focusManager:IFocusManager;
-
- private var _cachePolicy:String = "auto";
-
- private var _measuredHeight:Number = 0;
-
- private var _id:String;
-
- private var _owner:DisplayObjectContainer;
-
- public var transitions:Array;
-
- mx_internal var _parent:DisplayObjectContainer;
-
- private var _measuredMinWidth:Number = 0;
-
- private var oldMinWidth:Number;
-
- private var _enabled:Boolean = false;
-
- public var states:Array;
-
- private var _explicitWidth:Number;
-
- private var _mouseFocusEnabled:Boolean = true;
-
- private var oldHeight:Number = 0;
-
- private var _currentStateChanged:Boolean;
-
- private var cachedTextFormat:UITextFormat;
-
- private var _automationDelegate:IAutomationObject;
-
- mx_internal var _height:Number;
-
- private var _percentWidth:Number;
-
- private var _automationName:String = null;
-
- private var _isEffectStarted:Boolean = false;
-
- private var _styleName:Object;
-
- mx_internal var _document:Object;
-
- private var _errorString:String = "";
-
- private var oldExplicitHeight:Number;
-
- private var _nestLevel:int = 0;
-
- private var _explicitHeight:Number;
-
- private var _filters:Array;
-
- private var _toolTip:String;
-
- private var _focusPane:Sprite;
-
- private var playStateTransition:Boolean = true;
-
- private var _nonInheritingStyles:Object;
-
- private var _showInAutomationHierarchy:Boolean = true;
-
- private var _moduleFactory:IFlexModuleFactory;
-
- private var oldX:Number = 0;
-
- private var oldY:Number = 0;
-
- private var _instanceIndices:Array;
-
- private var _visible:Boolean = true;
-
- private var _inheritingStyles:Object;
-
- private var _includeInLayout:Boolean = true;
-
- mx_internal var _effectsStarted:Array;
-
- private var _explicitMinWidth:Number;
-
- private var resourceStateUndefined:String = null;
-
- mx_internal var _explicitMaxWidth:Number;
-
- private var _measuredMinHeight:Number = 0;
-
- private var _uid:String;
-
- private var _currentTransitionEffect:Effect;
-
- private var _updateCompletePendingFlag:Boolean = false;
-
- private var oldMinHeight:Number;
-
- mx_internal var _explicitMinHeight:Number;
-
- private var _percentHeight:Number;
-
- private var oldWidth:Number = 0;
-
- public function UIComponent()
- {
- packageResources = ResourceBundle.getResourceBundle("core",ApplicationDomain.currentDomain);
- resourceStateUndefined = null;
- listeningForRender = false;
- methodQueue = [];
- hasFocusRect = false;
- _initialized = false;
- _processedDescriptors = false;
- _updateCompletePendingFlag = false;
- mx_internal::invalidatePropertiesFlag = false;
- mx_internal::invalidateSizeFlag = false;
- mx_internal::invalidateDisplayListFlag = false;
- oldX = 0;
- oldY = 0;
- oldWidth = 0;
- oldHeight = 0;
- oldScaleX = 1;
- oldScaleY = 1;
- mx_internal::overlayReferenceCount = 0;
- mx_internal::saveBorderColor = true;
- _scaleX = 1;
- _scaleY = 1;
- _visible = true;
- _enabled = false;
- _nestLevel = 0;
- _inheritingStyles = UIComponent.mx_internal::STYLE_UNINITIALIZED;
- _nonInheritingStyles = UIComponent.mx_internal::STYLE_UNINITIALIZED;
- _cachePolicy = UIComponentCachePolicy.AUTO;
- cacheAsBitmapCount = 0;
- _focusEnabled = true;
- _mouseFocusEnabled = true;
- _measuredMinWidth = 0;
- _measuredMinHeight = 0;
- _measuredWidth = 0;
- _measuredHeight = 0;
- _includeInLayout = true;
- playStateTransition = true;
- states = [];
- transitions = [];
- _automationName = null;
- _showInAutomationHierarchy = true;
- _errorString = "";
- errorStringChanged = false;
- mx_internal::_effectsStarted = [];
- mx_internal::_affectedProperties = {};
- _isEffectStarted = false;
- _endingEffectInstances = [];
- super();
- focusRect = false;
- tabEnabled = this is IFocusManagerComponent;
- enabled = true;
- mx_internal::$visible = false;
- addEventListener(Event.ADDED,addedHandler);
- addEventListener(Event.REMOVED,removedHandler);
- if(this is IFocusManagerComponent)
- {
- addEventListener(FocusEvent.FOCUS_IN,focusInHandler);
- addEventListener(FocusEvent.FOCUS_OUT,focusOutHandler);
- addEventListener(KeyboardEvent.KEY_DOWN,keyDownHandler);
- addEventListener(KeyboardEvent.KEY_UP,keyUpHandler);
- }
- mx_internal::_width = super.width;
- mx_internal::_height = super.height;
- }
-
- public static function resumeBackgroundProcessing() : void
- {
- var _loc1_:SystemManager = null;
- if(UIComponentGlobals.mx_internal::callLaterSuspendCount > 0)
- {
- --UIComponentGlobals.mx_internal::callLaterSuspendCount;
- if(UIComponentGlobals.mx_internal::callLaterSuspendCount == 0)
- {
- _loc1_ = SystemManagerGlobals.topLevelSystemManagers[0];
- if(Boolean(_loc1_) && Boolean(_loc1_.stage))
- {
- _loc1_.stage.invalidate();
- }
- }
- }
- }
-
- public static function suspendBackgroundProcessing() : void
- {
- ++UIComponentGlobals.mx_internal::callLaterSuspendCount;
- }
-
- public function getStyle(param1:String) : *
- {
- return !!StyleManager.mx_internal::inheritingStyles[param1] ? _inheritingStyles[param1] : _nonInheritingStyles[param1];
- }
-
- [Bindable("toolTipChanged")]
- public function get toolTip() : String
- {
- return _toolTip;
- }
-
- private function transition_effectEndHandler(param1:EffectEvent) : void
- {
- _currentTransitionEffect = null;
- }
-
- public function get nestLevel() : int
- {
- return _nestLevel;
- }
-
- protected function adjustFocusRect(param1:DisplayObject = null) : void
- {
- var _loc2_:IFocusManager = null;
- var _loc3_:IFlexDisplayObject = null;
- var _loc4_:Number = NaN;
- var _loc5_:Number = NaN;
- var _loc6_:Point = null;
- var _loc7_:Number = NaN;
- if(!param1)
- {
- param1 = this;
- }
- if(isNaN(param1.width) || isNaN(param1.height))
- {
- return;
- }
- _loc2_ = focusManager;
- if(!_loc2_)
- {
- return;
- }
- _loc3_ = IFlexDisplayObject(mx_internal::getFocusObject());
- if(_loc3_)
- {
- if(Boolean(errorString) && errorString != "")
- {
- _loc4_ = getStyle("errorColor");
- }
- else
- {
- _loc4_ = getStyle("themeColor");
- }
- _loc5_ = getStyle("focusThickness");
- if(_loc3_ is IStyleClient)
- {
- IStyleClient(_loc3_).setStyle("focusColor",_loc4_);
- }
- _loc3_.setActualSize(param1.width + 2 * _loc5_,param1.height + 2 * _loc5_);
- if(rotation)
- {
- _loc7_ = rotation * Math.PI / 180;
- _loc6_ = new Point(param1.x - _loc5_ * (Math.cos(_loc7_) - Math.sin(_loc7_)),param1.y - _loc5_ * (Math.cos(_loc7_) + Math.sin(_loc7_)));
- DisplayObject(_loc3_).rotation = rotation;
- }
- else
- {
- _loc6_ = new Point(param1.x - _loc5_,param1.y - _loc5_);
- }
- if(param1.parent == this)
- {
- _loc6_.x += x;
- _loc6_.y += y;
- }
- _loc6_ = parent.localToGlobal(_loc6_);
- _loc6_ = parent.globalToLocal(_loc6_);
- _loc3_.move(_loc6_.x,_loc6_.y);
- if(_loc3_ is IInvalidating)
- {
- IInvalidating(_loc3_).validateNow();
- }
- else if(_loc3_ is ProgrammaticSkin)
- {
- ProgrammaticSkin(_loc3_).validateNow();
- }
- }
- }
-
- public function set nestLevel(param1:int) : void
- {
- var _loc2_:IChildList = null;
- var _loc3_:int = 0;
- var _loc4_:int = 0;
- var _loc5_:ILayoutManagerClient = null;
- var _loc6_:UITextField = null;
- if(param1 > 1 && _nestLevel != param1)
- {
- _nestLevel = param1;
- mx_internal::updateCallbacks();
- _loc2_ = this is IRawChildrenContainer ? IRawChildrenContainer(this).rawChildren : IChildList(this);
- _loc3_ = _loc2_.numChildren;
- _loc4_ = 0;
- while(_loc4_ < _loc3_)
- {
- _loc5_ = _loc2_.getChildAt(_loc4_) as ILayoutManagerClient;
- if(_loc5_)
- {
- _loc5_.nestLevel = param1 + 1;
- }
- else
- {
- _loc6_ = _loc2_.getChildAt(_loc4_) as UITextField;
- if(_loc6_)
- {
- _loc6_.nestLevel = param1 + 1;
- }
- }
- _loc4_++;
- }
- }
- }
-
- public function getExplicitOrMeasuredHeight() : Number
- {
- return !isNaN(explicitHeight) ? explicitHeight : measuredHeight;
- }
-
- private function callLaterDispatcher(param1:Event) : void
- {
- var layoutErrorEvent:DynamicEvent = null;
- var event:Event = param1;
- ++UIComponentGlobals.mx_internal::callLaterDispatcherCount;
- if(!UIComponentGlobals.mx_internal::designTime)
- {
- callLaterDispatcher2(event);
- }
- else
- {
- try
- {
- callLaterDispatcher2(event);
- }
- catch(e:Error)
- {
- layoutErrorEvent = new DynamicEvent("layoutError");
- layoutErrorEvent.error = e;
- systemManager.dispatchEvent(layoutErrorEvent);
- }
- }
- --UIComponentGlobals.mx_internal::callLaterDispatcherCount;
- }
-
- final mx_internal function get $width() : Number
- {
- return super.width;
- }
-
- public function get className() : String
- {
- var _loc1_:String = null;
- var _loc2_:int = 0;
- _loc1_ = getQualifiedClassName(this);
- _loc2_ = int(_loc1_.indexOf("::"));
- if(_loc2_ != -1)
- {
- _loc1_ = _loc1_.substr(_loc2_ + 2);
- }
- return _loc1_;
- }
-
- public function verticalGradientMatrix(param1:Number, param2:Number, param3:Number, param4:Number) : Matrix
- {
- UIComponentGlobals.mx_internal::tempMatrix.createGradientBox(param3,param4,Math.PI / 2,param1,param2);
- return UIComponentGlobals.mx_internal::tempMatrix;
- }
-
- public function setCurrentState(param1:String, param2:Boolean = true) : void
- {
- if(param1 != currentState && !(isBaseState(param1) && isBaseState(currentState)))
- {
- requestedCurrentState = param1;
- playStateTransition = param2;
- if(initialized)
- {
- commitCurrentState();
- }
- else
- {
- _currentStateChanged = true;
- addEventListener(FlexEvent.CREATION_COMPLETE,creationCompleteHandler);
- }
- }
- }
-
- private function getBaseStates(param1:State) : Array
- {
- var _loc2_:Array = null;
- _loc2_ = [];
- while(Boolean(param1) && param1.basedOn != "")
- {
- _loc2_.push(param1.basedOn);
- param1 = getState(param1.basedOn);
- }
- return _loc2_;
- }
-
- public function set minHeight(param1:Number) : void
- {
- if(explicitMinHeight == param1)
- {
- return;
- }
- explicitMinHeight = param1;
- }
-
- [Bindable("errorStringChanged")]
- public function get errorString() : String
- {
- return _errorString;
- }
-
- protected function isOurFocus(param1:DisplayObject) : Boolean
- {
- return param1 == this;
- }
-
- public function get automationName() : String
- {
- if(_automationName)
- {
- return _automationName;
- }
- if(automationDelegate)
- {
- return automationDelegate.automationName;
- }
- return "";
- }
-
- final mx_internal function set $width(param1:Number) : void
- {
- super.width = param1;
- }
-
- public function invalidateDisplayList() : void
- {
- if(!mx_internal::invalidateDisplayListFlag)
- {
- mx_internal::invalidateDisplayListFlag = true;
- if(Boolean(parent) && Boolean(UIComponentGlobals.mx_internal::layoutManager))
- {
- UIComponentGlobals.mx_internal::layoutManager.invalidateDisplayList(this);
- }
- }
- }
-
- [Bindable("scaleXChanged")]
- override public function get scaleX() : Number
- {
- return _scaleX;
- }
-
- [Bindable("scaleYChanged")]
- override public function get scaleY() : Number
- {
- return _scaleY;
- }
-
- mx_internal function initThemeColor() : Boolean
- {
- var _loc1_:Object = null;
- var _loc2_:Object = null;
- var _loc3_:Number = NaN;
- var _loc4_:Number = NaN;
- var _loc5_:Object = null;
- var _loc6_:Array = null;
- var _loc7_:int = 0;
- var _loc8_:CSSStyleDeclaration = null;
- _loc1_ = _styleName;
- if(_styleDeclaration)
- {
- _loc2_ = _styleDeclaration.getStyle("themeColor");
- _loc3_ = _styleDeclaration.getStyle("rollOverColor");
- _loc4_ = _styleDeclaration.getStyle("selectionColor");
- }
- if(!_loc2_ && _loc1_ && !(_loc1_ is ISimpleStyleClient))
- {
- _loc5_ = _loc1_ is String ? StyleManager.getStyleDeclaration("." + _loc1_) : _loc1_;
- if(_loc5_)
- {
- _loc2_ = _loc5_.getStyle("themeColor");
- _loc3_ = Number(_loc5_.getStyle("rollOverColor"));
- _loc4_ = Number(_loc5_.getStyle("selectionColor"));
- }
- }
- if(!_loc2_)
- {
- _loc6_ = getClassStyleDeclarations();
- _loc7_ = 0;
- while(_loc7_ < _loc6_.length)
- {
- _loc8_ = _loc6_[_loc7_];
- if(_loc8_)
- {
- _loc2_ = _loc8_.getStyle("themeColor");
- _loc3_ = _loc8_.getStyle("rollOverColor");
- _loc4_ = _loc8_.getStyle("selectionColor");
- }
- if(_loc2_)
- {
- break;
- }
- _loc7_++;
- }
- }
- if(_loc2_ && isNaN(_loc3_) && isNaN(_loc4_))
- {
- mx_internal::setThemeColor(_loc2_);
- return true;
- }
- return Boolean(_loc2_) && !isNaN(_loc3_) && !isNaN(_loc4_);
- }
-
- override public function get mouseX() : Number
- {
- if(!root || root[fakeMouseX] === undefined)
- {
- return super.mouseX;
- }
- return globalToLocal(new Point(root[fakeMouseX],0)).x;
- }
-
- override public function get mouseY() : Number
- {
- if(!root || root[fakeMouseY] === undefined)
- {
- return super.mouseY;
- }
- return globalToLocal(new Point(0,root[fakeMouseY])).y;
- }
-
- override public function stopDrag() : void
- {
- super.stopDrag();
- invalidateProperties();
- dispatchEvent(new Event("xChanged"));
- dispatchEvent(new Event("yChanged"));
- }
-
- public function get uid() : String
- {
- if(!_uid)
- {
- _uid = toString();
- }
- return _uid;
- }
-
- public function set tweeningProperties(param1:Array) : void
- {
- _tweeningProperties = param1;
- }
-
- public function get focusPane() : Sprite
- {
- return _focusPane;
- }
-
- public function horizontalGradientMatrix(param1:Number, param2:Number, param3:Number, param4:Number) : Matrix
- {
- UIComponentGlobals.mx_internal::tempMatrix.createGradientBox(param3,param4,0,param1,param2);
- return UIComponentGlobals.mx_internal::tempMatrix;
- }
-
- public function set validationSubField(param1:String) : void
- {
- _validationSubField = param1;
- }
-
- protected function keyDownHandler(param1:KeyboardEvent) : void
- {
- }
-
- public function get isDocument() : Boolean
- {
- return document == this;
- }
-
- mx_internal function addOverlay(param1:uint, param2:RoundedRectangle = null) : void
- {
- if(!mx_internal::overlay)
- {
- mx_internal::overlayColor = param1;
- mx_internal::overlay = new UIComponent();
- mx_internal::overlay.name = "overlay";
- mx_internal::fillOverlay(mx_internal::overlay,param1,param2);
- attachOverlay();
- if(!param2)
- {
- addEventListener(ResizeEvent.RESIZE,overlay_resizeHandler);
- }
- mx_internal::overlay.x = 0;
- mx_internal::overlay.y = 0;
- invalidateDisplayList();
- mx_internal::overlayReferenceCount = 1;
- }
- else
- {
- ++mx_internal::overlayReferenceCount;
- }
- dispatchEvent(new ChildExistenceChangedEvent(ChildExistenceChangedEvent.OVERLAY_CREATED,true,false,mx_internal::overlay));
- }
-
- [Bindable("show")]
- [Bindable("hide")]
- override public function get visible() : Boolean
- {
- return _visible;
- }
-
- public function get screen() : Rectangle
- {
- var _loc1_:ISystemManager = null;
- _loc1_ = systemManager;
- return !!_loc1_ ? _loc1_.screen : null;
- }
-
- [Bindable("xChanged")]
- override public function get x() : Number
- {
- return super.x;
- }
-
- [Bindable("yChanged")]
- override public function get y() : Number
- {
- return super.y;
- }
-
- [Bindable("explicitHeightChanged")]
- public function get explicitHeight() : Number
- {
- return _explicitHeight;
- }
-
- protected function focusInHandler(param1:FocusEvent) : void
- {
- var _loc2_:IFocusManager = null;
- if(isOurFocus(DisplayObject(param1.target)))
- {
- _loc2_ = focusManager;
- if(Boolean(_loc2_) && _loc2_.showFocusIndicator)
- {
- drawFocus(true);
- }
- Container.mx_internal::checkFocus(param1.relatedObject,this);
- }
- }
-
- private function focusObj_scrollHandler(param1:Event) : void
- {
- adjustFocusRect();
- }
-
- [Bindable("resize")]
- public function get percentWidth() : Number
- {
- return _percentWidth;
- }
-
- public function set automationName(param1:String) : void
- {
- _automationName = param1;
- }
-
- public function get mouseFocusEnabled() : Boolean
- {
- return _mouseFocusEnabled;
- }
-
- public function set explicitMinHeight(param1:Number) : void
- {
- var _loc2_:IInvalidating = null;
- if(mx_internal::_explicitMinHeight == param1)
- {
- return;
- }
- mx_internal::_explicitMinHeight = param1;
- invalidateSize();
- _loc2_ = parent as IInvalidating;
- if(_loc2_)
- {
- _loc2_.invalidateSize();
- _loc2_.invalidateDisplayList();
- }
- dispatchEvent(new Event("explicitMinHeightChanged"));
- }
-
- public function stylesInitialized() : void
- {
- }
-
- public function set errorString(param1:String) : void
- {
- ToolTipManager.mx_internal::registerErrorString(this,param1);
- _errorString = param1;
- errorStringChanged = true;
- invalidateProperties();
- dispatchEvent(new Event("errorStringChanged"));
- }
-
- public function getExplicitOrMeasuredWidth() : Number
- {
- return !isNaN(explicitWidth) ? explicitWidth : measuredWidth;
- }
-
- final mx_internal function set $height(param1:Number) : void
- {
- super.height = param1;
- }
-
- final mx_internal function $removeChild(param1:DisplayObject) : DisplayObject
- {
- return super.removeChild(param1);
- }
-
- override public function set scaleX(param1:Number) : void
- {
- if(_scaleX == param1)
- {
- return;
- }
- _scaleX = param1;
- invalidateProperties();
- invalidateSize();
- dispatchEvent(new Event("scaleXChanged"));
- }
-
- override public function set scaleY(param1:Number) : void
- {
- if(_scaleY == param1)
- {
- return;
- }
- _scaleY = param1;
- invalidateProperties();
- invalidateSize();
- dispatchEvent(new Event("scaleYChanged"));
- }
-
- protected function keyUpHandler(param1:KeyboardEvent) : void
- {
- }
-
- override public function get parent() : DisplayObjectContainer
- {
- return !!mx_internal::_parent ? mx_internal::_parent : super.parent;
- }
-
- mx_internal function get isEffectStarted() : Boolean
- {
- return _isEffectStarted;
- }
-
- public function set uid(param1:String) : void
- {
- this._uid = param1;
- }
-
- mx_internal function adjustSizesForScaleChanges() : void
- {
- var _loc1_:Number = NaN;
- var _loc2_:Number = NaN;
- var _loc3_:Number = NaN;
- _loc1_ = scaleX;
- _loc2_ = scaleY;
- if(_loc1_ != oldScaleX)
- {
- _loc3_ = Math.abs(_loc1_ / oldScaleX);
- if(explicitMinWidth)
- {
- explicitMinWidth *= _loc3_;
- }
- if(!isNaN(explicitWidth))
- {
- explicitWidth *= _loc3_;
- }
- if(explicitMaxWidth)
- {
- explicitMaxWidth *= _loc3_;
- }
- oldScaleX = _loc1_;
- }
- if(_loc2_ != oldScaleY)
- {
- _loc3_ = Math.abs(_loc2_ / oldScaleY);
- if(explicitMinHeight)
- {
- explicitMinHeight *= _loc3_;
- }
- if(explicitHeight)
- {
- explicitHeight *= _loc3_;
- }
- if(explicitMaxHeight)
- {
- explicitMaxHeight *= _loc3_;
- }
- oldScaleY = _loc2_;
- }
- }
-
- public function set focusPane(param1:Sprite) : void
- {
- if(param1)
- {
- addChild(param1);
- param1.x = 0;
- param1.y = 0;
- param1.scrollRect = null;
- _focusPane = param1;
- }
- else
- {
- removeChild(_focusPane);
- _focusPane = null;
- }
- }
-
- public function determineTextFormatFromStyles() : UITextFormat
- {
- var _loc1_:UITextFormat = null;
- _loc1_ = cachedTextFormat;
- if(!_loc1_)
- {
- _loc1_ = new UITextFormat(systemManager);
- _loc1_.align = _inheritingStyles.textAlign;
- _loc1_.bold = _inheritingStyles.fontWeight == "bold";
- _loc1_.color = enabled ? _inheritingStyles.color : _inheritingStyles.disabledColor;
- _loc1_.font = StringUtil.trimArrayElements(_inheritingStyles.fontFamily,",");
- _loc1_.indent = _inheritingStyles.textIndent;
- _loc1_.italic = _inheritingStyles.fontStyle == "italic";
- _loc1_.kerning = _inheritingStyles.kerning;
- _loc1_.leading = _nonInheritingStyles.leading;
- _loc1_.leftMargin = _nonInheritingStyles.paddingLeft;
- _loc1_.letterSpacing = _inheritingStyles.letterSpacing;
- _loc1_.rightMargin = _nonInheritingStyles.paddingRight;
- _loc1_.size = _inheritingStyles.fontSize;
- _loc1_.underline = _nonInheritingStyles.textDecoration == "underline";
- _loc1_.antiAliasType = _inheritingStyles.fontAntiAliasType;
- _loc1_.gridFitType = _inheritingStyles.fontGridFitType;
- _loc1_.sharpness = _inheritingStyles.fontSharpness;
- _loc1_.thickness = _inheritingStyles.fontThickness;
- cachedTextFormat = _loc1_;
- }
- return _loc1_;
- }
-
- public function getAutomationChildAt(param1:int) : IAutomationObject
- {
- if(automationDelegate)
- {
- return automationDelegate.getAutomationChildAt(param1);
- }
- return null;
- }
-
- private function focusObj_resizeHandler(param1:ResizeEvent) : void
- {
- adjustFocusRect();
- }
-
- public function validationResultHandler(param1:ValidationResultEvent) : void
- {
- var _loc2_:String = null;
- var _loc3_:ValidationResult = null;
- var _loc4_:int = 0;
- if(param1.type == ValidationResultEvent.VALID)
- {
- if(errorString != "")
- {
- errorString = "";
- dispatchEvent(new FlexEvent(FlexEvent.VALID));
- }
- }
- else
- {
- if(validationSubField != null && validationSubField != "" && Boolean(param1.results))
- {
- _loc4_ = 0;
- while(_loc4_ < param1.results.length)
- {
- _loc3_ = param1.results[_loc4_];
- if(_loc3_.subField == validationSubField)
- {
- if(_loc3_.isError)
- {
- _loc2_ = _loc3_.errorMessage;
- }
- else if(errorString != "")
- {
- errorString = "";
- dispatchEvent(new FlexEvent(FlexEvent.VALID));
- }
- break;
- }
- _loc4_++;
- }
- }
- else if(Boolean(param1.results) && param1.results.length > 0)
- {
- _loc2_ = param1.results[0].errorMessage;
- }
- if(Boolean(_loc2_) && errorString != _loc2_)
- {
- errorString = _loc2_;
- dispatchEvent(new FlexEvent(FlexEvent.INVALID));
- }
- }
- }
-
- public function invalidateProperties() : void
- {
- if(!mx_internal::invalidatePropertiesFlag)
- {
- mx_internal::invalidatePropertiesFlag = true;
- if(Boolean(parent) && Boolean(UIComponentGlobals.mx_internal::layoutManager))
- {
- UIComponentGlobals.mx_internal::layoutManager.invalidateProperties(this);
- }
- }
- }
-
- public function get inheritingStyles() : Object
- {
- return _inheritingStyles;
- }
-
- public function setActualSize(param1:Number, param2:Number) : void
- {
- var _loc3_:Boolean = false;
- _loc3_ = false;
- if(mx_internal::_width != param1)
- {
- mx_internal::_width = param1;
- dispatchEvent(new Event("widthChanged"));
- _loc3_ = true;
- }
- if(mx_internal::_height != param2)
- {
- mx_internal::_height = param2;
- dispatchEvent(new Event("heightChanged"));
- _loc3_ = true;
- }
- if(_loc3_)
- {
- invalidateDisplayList();
- dispatchResizeEvent();
- }
- }
-
- final mx_internal function get $x() : Number
- {
- return super.x;
- }
-
- final mx_internal function get $y() : Number
- {
- return super.y;
- }
-
- override public function set visible(param1:Boolean) : void
- {
- setVisible(param1);
- }
-
- public function registerEffects(param1:Array) : void
- {
- var _loc2_:int = 0;
- var _loc3_:int = 0;
- var _loc4_:String = null;
- _loc2_ = int(param1.length);
- _loc3_ = 0;
- while(_loc3_ < _loc2_)
- {
- _loc4_ = EffectManager.mx_internal::getEventForEffectTrigger(param1[_loc3_]);
- if(_loc4_ != null && _loc4_ != "")
- {
- addEventListener(_loc4_,EffectManager.mx_internal::eventHandler,false,EventPriority.EFFECT);
- }
- _loc3_++;
- }
- }
-
- public function createAutomationIDPart(param1:IAutomationObject) : Object
- {
- if(automationDelegate)
- {
- return automationDelegate.createAutomationIDPart(param1);
- }
- return null;
- }
-
- [Bindable("explicitMinWidthChanged")]
- public function get explicitMinWidth() : Number
- {
- return _explicitMinWidth;
- }
-
- private function filterChangeHandler(param1:Event) : void
- {
- super.filters = _filters;
- }
-
- override public function set x(param1:Number) : void
- {
- if(super.x == param1)
- {
- return;
- }
- super.x = param1;
- invalidateProperties();
- dispatchEvent(new Event("xChanged"));
- }
-
- override public function set y(param1:Number) : void
- {
- if(super.y == param1)
- {
- return;
- }
- super.y = param1;
- invalidateProperties();
- dispatchEvent(new Event("yChanged"));
- }
-
- public function set explicitHeight(param1:Number) : void
- {
- var _loc2_:IInvalidating = null;
- if(_explicitHeight == param1)
- {
- return;
- }
- if(!isNaN(param1))
- {
- _percentHeight = NaN;
- }
- _explicitHeight = param1;
- invalidateSize();
- _loc2_ = parent as IInvalidating;
- if(Boolean(_loc2_) && includeInLayout)
- {
- _loc2_.invalidateSize();
- _loc2_.invalidateDisplayList();
- }
- dispatchEvent(new Event("explicitHeightChanged"));
- }
-
- public function set showInAutomationHierarchy(param1:Boolean) : void
- {
- _showInAutomationHierarchy = param1;
- }
-
- public function set systemManager(param1:ISystemManager) : void
- {
- _systemManager = param1;
- }
-
- mx_internal function getFocusObject() : DisplayObject
- {
- var _loc1_:IFocusManager = null;
- _loc1_ = focusManager;
- if(!_loc1_ || !_loc1_.focusPane)
- {
- return null;
- }
- return _loc1_.focusPane.numChildren == 0 ? null : _loc1_.focusPane.getChildAt(0);
- }
-
- override public function addChild(param1:DisplayObject) : DisplayObject
- {
- var _loc2_:int = 0;
- _loc2_ = Boolean(mx_internal::overlayReferenceCount) && param1 != mx_internal::overlay ? int(Math.max(0,super.numChildren - 1)) : super.numChildren;
- mx_internal::addingChild(param1);
- mx_internal::$addChildAt(param1,_loc2_);
- mx_internal::childAdded(param1);
- return param1;
- }
-
- public function get moduleFactory() : IFlexModuleFactory
- {
- return _moduleFactory;
- }
-
- public function set percentWidth(param1:Number) : void
- {
- var _loc2_:IInvalidating = null;
- if(_percentWidth == param1)
- {
- return;
- }
- if(!isNaN(param1))
- {
- _explicitWidth = NaN;
- }
- _percentWidth = param1;
- _loc2_ = parent as IInvalidating;
- if(_loc2_)
- {
- _loc2_.invalidateSize();
- _loc2_.invalidateDisplayList();
- }
- }
-
- public function get document() : Object
- {
- return mx_internal::_document;
- }
-
- public function set mouseFocusEnabled(param1:Boolean) : void
- {
- _mouseFocusEnabled = param1;
- }
-
- final mx_internal function $addChild(param1:DisplayObject) : DisplayObject
- {
- return super.addChild(param1);
- }
-
- mx_internal function setThemeColor(param1:Object) : void
- {
- var _loc2_:Number = NaN;
- var _loc3_:Number = NaN;
- var _loc4_:Number = NaN;
- if(_loc2_ is String)
- {
- _loc2_ = parseInt(String(param1));
- }
- else
- {
- _loc2_ = Number(param1);
- }
- if(isNaN(_loc2_))
- {
- _loc2_ = StyleManager.getColorName(param1);
- }
- _loc3_ = ColorUtil.adjustBrightness2(_loc2_,50);
- _loc4_ = ColorUtil.adjustBrightness2(_loc2_,70);
- setStyle("selectionColor",_loc3_);
- setStyle("rollOverColor",_loc4_);
- }
-
- [Bindable("heightChanged")]
- override public function get height() : Number
- {
- return mx_internal::_height;
- }
-
- public function get id() : String
- {
- return _id;
- }
-
- public function set minWidth(param1:Number) : void
- {
- if(explicitMinWidth == param1)
- {
- return;
- }
- explicitMinWidth = param1;
- }
-
- public function set currentState(param1:String) : void
- {
- setCurrentState(param1,true);
- }
-
- public function getRepeaterItem(param1:int = -1) : Object
- {
- var _loc2_:Array = null;
- _loc2_ = repeaters;
- if(param1 == -1)
- {
- param1 = int(_loc2_.length - 1);
- }
- return _loc2_[param1].getItemAt(repeaterIndices[param1]);
- }
-
- public function executeBindings(param1:Boolean = false) : void
- {
- var _loc2_:Object = null;
- _loc2_ = Boolean(descriptor) && Boolean(descriptor.document) ? descriptor.document : parentDocument;
- BindingManager.executeBindings(_loc2_,id,this);
- }
-
- public function replayAutomatableEvent(param1:Event) : Boolean
- {
- if(automationDelegate)
- {
- return automationDelegate.replayAutomatableEvent(param1);
- }
- return false;
- }
-
- public function get instanceIndex() : int
- {
- return !!_instanceIndices ? int(_instanceIndices[_instanceIndices.length - 1]) : -1;
- }
-
- [Bindable("explicitMaxWidthChanged")]
- public function get explicitMaxWidth() : Number
- {
- return mx_internal::_explicitMaxWidth;
- }
-
- public function effectFinished(param1:EffectInstance) : void
- {
- _endingEffectInstances.push(param1);
- invalidateProperties();
- UIComponentGlobals.mx_internal::layoutManager.addEventListener(FlexEvent.UPDATE_COMPLETE,updateCompleteHandler,false,0,true);
- }
-
- public function set measuredWidth(param1:Number) : void
- {
- _measuredWidth = param1;
- }
-
- override public function removeChildAt(param1:int) : DisplayObject
- {
- var _loc2_:DisplayObject = null;
- _loc2_ = getChildAt(param1);
- mx_internal::removingChild(_loc2_);
- mx_internal::$removeChild(_loc2_);
- mx_internal::childRemoved(_loc2_);
- return _loc2_;
- }
-
- mx_internal function set isEffectStarted(param1:Boolean) : void
- {
- _isEffectStarted = param1;
- }
-
- mx_internal function fillOverlay(param1:UIComponent, param2:uint, param3:RoundedRectangle = null) : void
- {
- var _loc4_:Graphics = null;
- if(!param3)
- {
- param3 = new RoundedRectangle(0,0,unscaledWidth,unscaledHeight,0);
- }
- _loc4_ = param1.graphics;
- _loc4_.clear();
- _loc4_.beginFill(param2);
- _loc4_.drawRoundRect(param3.x,param3.y,param3.width,param3.height,param3.cornerRadius * 2,param3.cornerRadius * 2);
- _loc4_.endFill();
- }
-
- mx_internal function childAdded(param1:DisplayObject) : void
- {
- if(param1 is UIComponent)
- {
- if(!UIComponent(param1).initialized)
- {
- UIComponent(param1).initialize();
- }
- }
- else if(param1 is IUIComponent)
- {
- IUIComponent(param1).initialize();
- }
- }
-
- public function globalToContent(param1:Point) : Point
- {
- return globalToLocal(param1);
- }
-
- public function get instanceIndices() : Array
- {
- return !!_instanceIndices ? _instanceIndices.slice(0) : null;
- }
-
- mx_internal function removingChild(param1:DisplayObject) : void
- {
- }
-
- private function getTransition(param1:String, param2:String) : Effect
- {
- var _loc3_:Effect = null;
- var _loc4_:int = 0;
- var _loc5_:int = 0;
- var _loc6_:Transition = null;
- _loc3_ = null;
- _loc4_ = 0;
- if(!transitions)
- {
- return null;
- }
- if(!param1)
- {
- param1 = "";
- }
- if(!param2)
- {
- param2 = "";
- }
- _loc5_ = 0;
- while(_loc5_ < transitions.length)
- {
- _loc6_ = transitions[_loc5_];
- if(_loc6_.fromState == "*" && _loc6_.toState == "*" && _loc4_ < 1)
- {
- _loc3_ = _loc6_.effect;
- _loc4_ = 1;
- }
- else if(_loc6_.fromState == param1 && _loc6_.toState == "*" && _loc4_ < 2)
- {
- _loc3_ = _loc6_.effect;
- _loc4_ = 2;
- }
- else if(_loc6_.fromState == "*" && _loc6_.toState == param2 && _loc4_ < 3)
- {
- _loc3_ = _loc6_.effect;
- _loc4_ = 3;
- }
- else if(_loc6_.fromState == param1 && _loc6_.toState == param2 && _loc4_ < 4)
- {
- _loc3_ = _loc6_.effect;
- _loc4_ = 4;
- break;
- }
- _loc5_++;
- }
- return _loc3_;
- }
-
- public function set owner(param1:DisplayObjectContainer) : void
- {
- _owner = param1;
- }
-
- mx_internal function getEffectsForProperty(param1:String) : Array
- {
- return mx_internal::_affectedProperties[param1] != undefined ? mx_internal::_affectedProperties[param1] : [];
- }
-
- protected function get unscaledWidth() : Number
- {
- return width / Math.abs(scaleX);
- }
-
- public function set processedDescriptors(param1:Boolean) : void
- {
- _processedDescriptors = param1;
- if(param1)
- {
- dispatchEvent(new FlexEvent(FlexEvent.INITIALIZE));
- }
- }
-
- private function processEffectFinished(param1:Array) : void
- {
- var _loc2_:int = 0;
- var _loc3_:int = 0;
- var _loc4_:EffectInstance = null;
- var _loc5_:EffectInstance = null;
- var _loc6_:Array = null;
- var _loc7_:int = 0;
- var _loc8_:String = null;
- var _loc9_:int = 0;
- _loc2_ = int(mx_internal::_effectsStarted.length - 1);
- while(_loc2_ >= 0)
- {
- _loc3_ = 0;
- while(_loc3_ < param1.length)
- {
- _loc4_ = param1[_loc3_];
- if(_loc4_ == mx_internal::_effectsStarted[_loc2_])
- {
- _loc5_ = mx_internal::_effectsStarted[_loc2_];
- mx_internal::_effectsStarted.splice(_loc2_,1);
- _loc6_ = _loc5_.effect.getAffectedProperties();
- _loc7_ = 0;
- while(_loc7_ < _loc6_.length)
- {
- _loc8_ = _loc6_[_loc7_];
- if(mx_internal::_affectedProperties[_loc8_] != undefined)
- {
- _loc9_ = 0;
- while(_loc9_ < mx_internal::_affectedProperties[_loc8_].length)
- {
- if(mx_internal::_affectedProperties[_loc8_][_loc9_] == _loc4_)
- {
- mx_internal::_affectedProperties[_loc8_].splice(_loc9_,1);
- break;
- }
- _loc9_++;
- }
- if(mx_internal::_affectedProperties[_loc8_].length == 0)
- {
- delete mx_internal::_affectedProperties[_loc8_];
- }
- }
- _loc7_++;
- }
- break;
- }
- _loc3_++;
- }
- _loc2_--;
- }
- mx_internal::isEffectStarted = mx_internal::_effectsStarted.length > 0 ? true : false;
- }
-
- protected function measure() : void
- {
- measuredWidth = !isNaN(mx_internal::_width) ? mx_internal::_width : 0;
- measuredHeight = !isNaN(mx_internal::_height) ? mx_internal::_height : 0;
- }
-
- private function dispatchResizeEvent() : void
- {
- var _loc1_:ResizeEvent = null;
- _loc1_ = new ResizeEvent(ResizeEvent.RESIZE);
- _loc1_.oldWidth = oldWidth;
- _loc1_.oldHeight = oldHeight;
- dispatchEvent(_loc1_);
- oldWidth = width;
- oldHeight = height;
- }
-
- [Bindable("includeInLayoutChanged")]
- public function get includeInLayout() : Boolean
- {
- return _includeInLayout;
- }
-
- public function set maxWidth(param1:Number) : void
- {
- if(explicitMaxWidth == param1)
- {
- return;
- }
- explicitMaxWidth = param1;
- }
-
- public function validateDisplayList() : void
- {
- var _loc1_:ISystemManager = null;
- if(mx_internal::invalidateDisplayListFlag)
- {
- _loc1_ = parent as ISystemManager;
- if(_loc1_)
- {
- if(_loc1_ == systemManager.topLevelSystemManager && _loc1_.document != this)
- {
- setActualSize(getExplicitOrMeasuredWidth(),getExplicitOrMeasuredHeight());
- }
- }
- updateDisplayList(scaleX == 0 ? 0 : width / scaleX,scaleY == 0 ? 0 : height / scaleY);
- mx_internal::invalidateDisplayListFlag = false;
- }
- }
-
- public function contentToGlobal(param1:Point) : Point
- {
- return localToGlobal(param1);
- }
-
- public function resolveAutomationIDPart(param1:Object) : Array
- {
- if(automationDelegate)
- {
- return automationDelegate.resolveAutomationIDPart(param1);
- }
- return [];
- }
-
- public function setFocus() : void
- {
- var _loc1_:ISystemManager = null;
- _loc1_ = systemManager;
- if(Boolean(_loc1_) && Boolean(_loc1_.stage))
- {
- if(UIComponentGlobals.mx_internal::callLaterDispatcherCount == 0)
- {
- _loc1_.stage.focus = this;
- UIComponentGlobals.mx_internal::nextFocusObject = null;
- }
- else
- {
- UIComponentGlobals.mx_internal::nextFocusObject = this;
- _loc1_.stage.addEventListener(Event.ENTER_FRAME,setFocusLater);
- }
- }
- else
- {
- UIComponentGlobals.mx_internal::nextFocusObject = this;
- callLater(setFocusLater);
- }
- }
-
- public function set inheritingStyles(param1:Object) : void
- {
- _inheritingStyles = param1;
- }
-
- public function set initialized(param1:Boolean) : void
- {
- _initialized = param1;
- if(param1)
- {
- setVisible(_visible,true);
- dispatchEvent(new FlexEvent(FlexEvent.CREATION_COMPLETE));
- }
- }
-
- public function owns(param1:DisplayObject) : Boolean
- {
- var _loc2_:IChildList = null;
- _loc2_ = this is IRawChildrenContainer ? IRawChildrenContainer(this).rawChildren : IChildList(this);
- if(_loc2_.contains(param1))
- {
- return true;
- }
- while(Boolean(param1) && param1 != this)
- {
- if(param1 is IUIComponent)
- {
- param1 = IUIComponent(param1).owner;
- }
- else
- {
- param1 = param1.parent;
- }
- }
- return param1 == this;
- }
-
- public function setVisible(param1:Boolean, param2:Boolean = false) : void
- {
- _visible = param1;
- if(!initialized)
- {
- return;
- }
- if(mx_internal::$visible == param1)
- {
- return;
- }
- mx_internal::$visible = param1;
- if(!param2)
- {
- dispatchEvent(new FlexEvent(param1 ? FlexEvent.SHOW : FlexEvent.HIDE));
- }
- }
-
- final mx_internal function set $y(param1:Number) : void
- {
- super.y = param1;
- }
-
- final mx_internal function $addChildAt(param1:DisplayObject, param2:int) : DisplayObject
- {
- return super.addChildAt(param1,param2);
- }
-
- public function deleteReferenceOnParentDocument(param1:IFlexDisplayObject) : void
- {
- var _loc2_:Array = null;
- var _loc3_:Object = null;
- var _loc4_:Array = null;
- var _loc5_:int = 0;
- var _loc6_:int = 0;
- var _loc7_:int = 0;
- var _loc8_:Object = null;
- var _loc9_:PropertyChangeEvent = null;
- if(Boolean(id) && id != "")
- {
- _loc2_ = _instanceIndices;
- if(!_loc2_)
- {
- param1[id] = null;
- }
- else
- {
- _loc3_ = param1[id];
- if(!_loc3_)
- {
- return;
- }
- _loc4_ = [];
- _loc4_.push(_loc3_);
- _loc5_ = int(_loc2_.length);
- _loc6_ = 0;
- while(_loc6_ < _loc5_ - 1)
- {
- _loc8_ = _loc3_[_loc2_[_loc6_]];
- if(!_loc8_)
- {
- return;
- }
- _loc3_ = _loc8_;
- _loc4_.push(_loc3_);
- _loc6_++;
- }
- _loc3_.splice(_loc2_[_loc5_ - 1],1);
- _loc7_ = int(_loc4_.length - 1);
- while(_loc7_ > 0)
- {
- if(_loc4_[_loc7_].length == 0)
- {
- _loc4_[_loc7_ - 1].splice(_loc2_[_loc7_],1);
- }
- _loc7_--;
- }
- if(_loc4_.length > 0 && _loc4_[0].length == 0)
- {
- param1[id] = null;
- }
- else
- {
- _loc9_ = PropertyChangeEvent.createUpdateEvent(param1,id,param1[id],param1[id]);
- param1.dispatchEvent(_loc9_);
- }
- }
- }
- }
-
- private function commitCurrentState() : void
- {
- var _loc1_:Effect = null;
- var _loc2_:String = null;
- var _loc3_:StateChangeEvent = null;
- var _loc4_:String = null;
- var _loc5_:State = null;
- _loc1_ = playStateTransition ? getTransition(_currentState,requestedCurrentState) : null;
- _loc2_ = findCommonBaseState(_currentState,requestedCurrentState);
- _loc4_ = !!_currentState ? _currentState : "";
- _loc5_ = getState(requestedCurrentState);
- if(_currentTransitionEffect)
- {
- _currentTransitionEffect.end();
- }
- initializeState(requestedCurrentState);
- if(_loc1_)
- {
- _loc1_.captureStartValues();
- }
- _loc3_ = new StateChangeEvent(StateChangeEvent.CURRENT_STATE_CHANGING);
- _loc3_.oldState = _loc4_;
- _loc3_.newState = !!requestedCurrentState ? requestedCurrentState : "";
- dispatchEvent(_loc3_);
- if(isBaseState(_currentState))
- {
- dispatchEvent(new FlexEvent(FlexEvent.EXIT_STATE));
- }
- removeState(_currentState,_loc2_);
- _currentState = requestedCurrentState;
- if(isBaseState(currentState))
- {
- dispatchEvent(new FlexEvent(FlexEvent.ENTER_STATE));
- }
- else
- {
- applyState(_currentState,_loc2_);
- }
- _loc3_ = new StateChangeEvent(StateChangeEvent.CURRENT_STATE_CHANGE);
- _loc3_.oldState = _loc4_;
- _loc3_.newState = !!_currentState ? _currentState : "";
- dispatchEvent(_loc3_);
- if(_loc1_)
- {
- UIComponentGlobals.mx_internal::layoutManager.validateNow();
- _currentTransitionEffect = _loc1_;
- _loc1_.addEventListener(EffectEvent.EFFECT_END,transition_effectEndHandler);
- _loc1_.play();
- }
- }
-
- public function get nonInheritingStyles() : Object
- {
- return _nonInheritingStyles;
- }
-
- final mx_internal function set $x(param1:Number) : void
- {
- super.x = param1;
- }
-
- private function applyState(param1:String, param2:String) : void
- {
- var _loc3_:State = null;
- var _loc4_:Array = null;
- var _loc5_:int = 0;
- _loc3_ = getState(param1);
- if(_loc3_)
- {
- if(_loc3_.basedOn != param2)
- {
- applyState(_loc3_.basedOn,param2);
- }
- _loc4_ = _loc3_.overrides;
- _loc5_ = 0;
- while(_loc5_ < _loc4_.length)
- {
- _loc4_[_loc5_].apply(this);
- _loc5_++;
- }
- _loc3_.mx_internal::dispatchEnterState();
- }
- }
-
- [Bindable("widthChanged")]
- override public function get width() : Number
- {
- return mx_internal::_width;
- }
-
- public function effectStarted(param1:EffectInstance) : void
- {
- var _loc2_:Array = null;
- var _loc3_:int = 0;
- var _loc4_:String = null;
- mx_internal::_effectsStarted.push(param1);
- _loc2_ = param1.effect.getAffectedProperties();
- _loc3_ = 0;
- while(_loc3_ < _loc2_.length)
- {
- _loc4_ = _loc2_[_loc3_];
- if(mx_internal::_affectedProperties[_loc4_] == undefined)
- {
- mx_internal::_affectedProperties[_loc4_] = [];
- }
- mx_internal::_affectedProperties[_loc4_].push(param1);
- _loc3_++;
- }
- mx_internal::isEffectStarted = true;
- }
-
- protected function commitProperties() : void
- {
- var _loc1_:Number = NaN;
- var _loc2_:Number = NaN;
- if(_scaleX != oldScaleX)
- {
- _loc1_ = Math.abs(_scaleX / oldScaleX);
- if(!isNaN(explicitMinWidth))
- {
- explicitMinWidth *= _loc1_;
- }
- if(!isNaN(explicitWidth))
- {
- explicitWidth *= _loc1_;
- }
- if(!isNaN(explicitMaxWidth))
- {
- explicitMaxWidth *= _loc1_;
- }
- mx_internal::_width *= _loc1_;
- super.scaleX = oldScaleX = _scaleX;
- }
- if(_scaleY != oldScaleY)
- {
- _loc2_ = Math.abs(_scaleY / oldScaleY);
- if(!isNaN(explicitMinHeight))
- {
- explicitMinHeight *= _loc2_;
- }
- if(!isNaN(explicitHeight))
- {
- explicitHeight *= _loc2_;
- }
- if(!isNaN(explicitMaxHeight))
- {
- explicitMaxHeight *= _loc2_;
- }
- mx_internal::_height *= _loc2_;
- super.scaleY = oldScaleY = _scaleY;
- }
- if(x != oldX || y != oldY)
- {
- dispatchMoveEvent();
- }
- if(width != oldWidth || height != oldHeight)
- {
- dispatchResizeEvent();
- }
- if(errorStringChanged)
- {
- errorStringChanged = false;
- setBorderColorForErrorString();
- }
- }
-
- [Bindable("resize")]
- public function get percentHeight() : Number
- {
- return _percentHeight;
- }
-
- final mx_internal function get $parent() : DisplayObjectContainer
- {
- return super.parent;
- }
-
- public function set explicitMinWidth(param1:Number) : void
- {
- var _loc2_:IInvalidating = null;
- if(_explicitMinWidth == param1)
- {
- return;
- }
- _explicitMinWidth = param1;
- invalidateSize();
- _loc2_ = parent as IInvalidating;
- if(_loc2_)
- {
- _loc2_.invalidateSize();
- _loc2_.invalidateDisplayList();
- }
- dispatchEvent(new Event("explicitMinWidthChanged"));
- }
-
- public function get isPopUp() : Boolean
- {
- return _isPopUp;
- }
-
- private function measureSizes() : Boolean
- {
- var _loc1_:Boolean = false;
- var _loc2_:Number = NaN;
- var _loc3_:Number = NaN;
- var _loc4_:Number = NaN;
- var _loc5_:Number = NaN;
- _loc1_ = false;
- if(!mx_internal::invalidateSizeFlag)
- {
- return _loc1_;
- }
- if(isNaN(explicitWidth) || isNaN(explicitHeight))
- {
- _loc4_ = Math.abs(scaleX);
- _loc5_ = Math.abs(scaleY);
- if(_loc4_ != 1)
- {
- _measuredMinWidth /= _loc4_;
- _measuredWidth /= _loc4_;
- }
- if(_loc5_ != 1)
- {
- _measuredMinHeight /= _loc5_;
- _measuredHeight /= _loc5_;
- }
- measure();
- mx_internal::invalidateSizeFlag = false;
- if(!isNaN(explicitMinWidth) && measuredWidth < explicitMinWidth)
- {
- measuredWidth = explicitMinWidth;
- }
- if(!isNaN(explicitMaxWidth) && measuredWidth > explicitMaxWidth)
- {
- measuredWidth = explicitMaxWidth;
- }
- if(!isNaN(explicitMinHeight) && measuredHeight < explicitMinHeight)
- {
- measuredHeight = explicitMinHeight;
- }
- if(!isNaN(explicitMaxHeight) && measuredHeight > explicitMaxHeight)
- {
- measuredHeight = explicitMaxHeight;
- }
- if(_loc4_ != 1)
- {
- _measuredMinWidth *= _loc4_;
- _measuredWidth *= _loc4_;
- }
- if(_loc5_ != 1)
- {
- _measuredMinHeight *= _loc5_;
- _measuredHeight *= _loc5_;
- }
- }
- else
- {
- mx_internal::invalidateSizeFlag = false;
- _measuredMinWidth = 0;
- _measuredMinHeight = 0;
- }
- mx_internal::adjustSizesForScaleChanges();
- if(isNaN(oldMinWidth))
- {
- oldMinWidth = !isNaN(explicitMinWidth) ? explicitMinWidth : measuredMinWidth;
- oldMinHeight = !isNaN(explicitMinHeight) ? explicitMinHeight : measuredMinHeight;
- oldExplicitWidth = !isNaN(explicitWidth) ? explicitWidth : measuredWidth;
- oldExplicitHeight = !isNaN(explicitHeight) ? explicitHeight : measuredHeight;
- _loc1_ = true;
- }
- else
- {
- _loc3_ = !isNaN(explicitMinWidth) ? explicitMinWidth : measuredMinWidth;
- if(_loc3_ != oldMinWidth)
- {
- oldMinWidth = _loc3_;
- _loc1_ = true;
- }
- _loc3_ = !isNaN(explicitMinHeight) ? explicitMinHeight : measuredMinHeight;
- if(_loc3_ != oldMinHeight)
- {
- oldMinHeight = _loc3_;
- _loc1_ = true;
- }
- _loc3_ = !isNaN(explicitWidth) ? explicitWidth : measuredWidth;
- if(_loc3_ != oldExplicitWidth)
- {
- oldExplicitWidth = _loc3_;
- _loc1_ = true;
- }
- _loc3_ = !isNaN(explicitHeight) ? explicitHeight : measuredHeight;
- if(_loc3_ != oldExplicitHeight)
- {
- oldExplicitHeight = _loc3_;
- _loc1_ = true;
- }
- }
- return _loc1_;
- }
-
- public function get automationTabularData() : Object
- {
- if(automationDelegate)
- {
- return automationDelegate.automationTabularData;
- }
- return null;
- }
-
- public function validateNow() : void
- {
- UIComponentGlobals.mx_internal::layoutManager.validateClient(this);
- }
-
- public function finishPrint(param1:Object, param2:IFlexDisplayObject) : void
- {
- }
-
- public function get repeaters() : Array
- {
- return !!_repeaters ? _repeaters.slice(0) : [];
- }
-
- private function dispatchMoveEvent() : void
- {
- var _loc1_:MoveEvent = null;
- _loc1_ = new MoveEvent(MoveEvent.MOVE);
- _loc1_.oldX = oldX;
- _loc1_.oldY = oldY;
- dispatchEvent(_loc1_);
- oldX = x;
- oldY = y;
- }
-
- public function get measuredMinHeight() : Number
- {
- return _measuredMinHeight;
- }
-
- public function drawFocus(param1:Boolean) : void
- {
- var _loc2_:DisplayObject = null;
- var _loc3_:Sprite = null;
- var _loc4_:DisplayObjectContainer = null;
- var _loc5_:Class = null;
- if(!parent)
- {
- return;
- }
- _loc2_ = mx_internal::getFocusObject();
- _loc3_ = !!focusManager ? focusManager.focusPane : null;
- if(param1 && !mx_internal::isEffectStarted)
- {
- _loc4_ = _loc3_.parent;
- if(_loc4_ != parent)
- {
- if(_loc4_)
- {
- if(_loc4_ is ISystemManager)
- {
- ISystemManager(_loc4_).focusPane = null;
- }
- else
- {
- IUIComponent(_loc4_).focusPane = null;
- }
- }
- if(parent is ISystemManager)
- {
- ISystemManager(parent).focusPane = _loc3_;
- }
- else
- {
- IUIComponent(parent).focusPane = _loc3_;
- }
- }
- _loc5_ = getStyle("focusSkin");
- if(Boolean(_loc2_) && !(_loc2_ is _loc5_))
- {
- _loc3_.removeChild(_loc2_);
- _loc2_ = null;
- }
- if(!_loc2_)
- {
- _loc2_ = new _loc5_();
- _loc2_.name = "focus";
- _loc3_.addChild(_loc2_);
- }
- if(_loc2_ is ILayoutManagerClient)
- {
- ILayoutManagerClient(_loc2_).nestLevel = nestLevel;
- }
- if(_loc2_ is ISimpleStyleClient)
- {
- ISimpleStyleClient(_loc2_).styleName = this;
- }
- addEventListener(MoveEvent.MOVE,focusObj_moveHandler,true);
- addEventListener(MoveEvent.MOVE,focusObj_moveHandler);
- addEventListener(ResizeEvent.RESIZE,focusObj_resizeHandler,true);
- addEventListener(ResizeEvent.RESIZE,focusObj_resizeHandler);
- addEventListener(Event.REMOVED,focusObj_removedHandler,true);
- _loc2_.visible = true;
- hasFocusRect = true;
- adjustFocusRect();
- }
- else if(hasFocusRect)
- {
- if(_loc2_)
- {
- _loc2_.visible = false;
- }
- removeEventListener(MoveEvent.MOVE,focusObj_moveHandler);
- removeEventListener(MoveEvent.MOVE,focusObj_moveHandler,true);
- removeEventListener(ResizeEvent.RESIZE,focusObj_resizeHandler,true);
- removeEventListener(ResizeEvent.RESIZE,focusObj_resizeHandler);
- removeEventListener(Event.REMOVED,focusObj_removedHandler,true);
- }
- }
-
- private function get indexedID() : String
- {
- var _loc1_:String = null;
- var _loc2_:Array = null;
- _loc1_ = id;
- _loc2_ = instanceIndices;
- if(_loc2_)
- {
- _loc1_ += "[" + _loc2_.join("][") + "]";
- }
- return _loc1_;
- }
-
- mx_internal function addingChild(param1:DisplayObject) : void
- {
- if(param1 is IUIComponent && !IUIComponent(param1).document)
- {
- IUIComponent(param1).document = !!document ? document : Application.application;
- }
- if(param1 is IUIComponent)
- {
- IUIComponent(param1).parentChanged(this);
- }
- if(param1 is ILayoutManagerClient)
- {
- ILayoutManagerClient(param1).nestLevel = nestLevel + 1;
- }
- else if(param1 is UITextField)
- {
- UITextField(param1).nestLevel = nestLevel + 1;
- }
- if(param1 is InteractiveObject)
- {
- if(doubleClickEnabled)
- {
- InteractiveObject(param1).doubleClickEnabled = true;
- }
- }
- if(param1 is IStyleClient)
- {
- IStyleClient(param1).regenerateStyleCache(true);
- }
- else if(param1 is UITextField && Boolean(UITextField(param1).inheritingStyles))
- {
- StyleProtoChain.initTextField(UITextField(param1));
- }
- if(param1 is ISimpleStyleClient)
- {
- ISimpleStyleClient(param1).styleChanged(null);
- }
- if(param1 is IStyleClient)
- {
- IStyleClient(param1).notifyStyleChangeInChildren(null,true);
- }
- if(param1 is UIComponent)
- {
- UIComponent(param1).mx_internal::initThemeColor();
- }
- if(param1 is UIComponent)
- {
- UIComponent(param1).stylesInitialized();
- }
- }
-
- protected function initializationComplete() : void
- {
- processedDescriptors = true;
- }
-
- public function set moduleFactory(param1:IFlexModuleFactory) : void
- {
- _moduleFactory = param1;
- }
-
- public function set repeaterIndices(param1:Array) : void
- {
- _repeaterIndices = param1;
- }
-
- private function focusObj_removedHandler(param1:Event) : void
- {
- var _loc2_:DisplayObject = null;
- if(param1.target != this)
- {
- return;
- }
- _loc2_ = mx_internal::getFocusObject();
- if(_loc2_)
- {
- _loc2_.visible = false;
- }
- }
-
- mx_internal function updateCallbacks() : void
- {
- if(mx_internal::invalidateDisplayListFlag)
- {
- UIComponentGlobals.mx_internal::layoutManager.invalidateDisplayList(this);
- }
- if(mx_internal::invalidateSizeFlag)
- {
- UIComponentGlobals.mx_internal::layoutManager.invalidateSize(this);
- }
- if(mx_internal::invalidatePropertiesFlag)
- {
- UIComponentGlobals.mx_internal::layoutManager.invalidateProperties(this);
- }
- if(systemManager)
- {
- if(methodQueue.length > 0 && !listeningForRender)
- {
- _systemManager.stage.addEventListener(Event.RENDER,callLaterDispatcher);
- _systemManager.stage.addEventListener(Event.ENTER_FRAME,callLaterDispatcher);
- listeningForRender = true;
- }
- _systemManager.stage.invalidate();
- }
- }
-
- public function set styleDeclaration(param1:CSSStyleDeclaration) : void
- {
- _styleDeclaration = param1;
- }
-
- override public function set doubleClickEnabled(param1:Boolean) : void
- {
- var _loc2_:IChildList = null;
- var _loc3_:int = 0;
- var _loc4_:InteractiveObject = null;
- super.doubleClickEnabled = param1;
- if(this is IRawChildrenContainer)
- {
- _loc2_ = IRawChildrenContainer(this).rawChildren;
- }
- else
- {
- _loc2_ = IChildList(this);
- }
- _loc3_ = 0;
- while(_loc3_ < _loc2_.numChildren)
- {
- _loc4_ = _loc2_.getChildAt(_loc3_) as InteractiveObject;
- if(_loc4_)
- {
- _loc4_.doubleClickEnabled = param1;
- }
- _loc3_++;
- }
- }
-
- public function prepareToPrint(param1:IFlexDisplayObject) : Object
- {
- return null;
- }
-
- [Bindable("explicitMinHeightChanged")]
- public function get minHeight() : Number
- {
- if(!isNaN(explicitMinHeight))
- {
- return explicitMinHeight;
- }
- return measuredMinHeight;
- }
-
- public function notifyStyleChangeInChildren(param1:String, param2:Boolean) : void
- {
- var _loc3_:int = 0;
- var _loc4_:int = 0;
- var _loc5_:ISimpleStyleClient = null;
- cachedTextFormat = null;
- _loc3_ = numChildren;
- _loc4_ = 0;
- while(_loc4_ < _loc3_)
- {
- _loc5_ = getChildAt(_loc4_) as ISimpleStyleClient;
- if(_loc5_)
- {
- _loc5_.styleChanged(param1);
- if(_loc5_ is IStyleClient)
- {
- IStyleClient(_loc5_).notifyStyleChangeInChildren(param1,param2);
- }
- }
- _loc4_++;
- }
- }
-
- public function get contentMouseX() : Number
- {
- return mouseX;
- }
-
- public function get contentMouseY() : Number
- {
- return mouseY;
- }
-
- public function get tweeningProperties() : Array
- {
- return _tweeningProperties;
- }
-
- public function set explicitMaxWidth(param1:Number) : void
- {
- var _loc2_:IInvalidating = null;
- if(mx_internal::_explicitMaxWidth == param1)
- {
- return;
- }
- mx_internal::_explicitMaxWidth = param1;
- invalidateSize();
- _loc2_ = parent as IInvalidating;
- if(_loc2_)
- {
- _loc2_.invalidateSize();
- _loc2_.invalidateDisplayList();
- }
- dispatchEvent(new Event("explicitMaxWidthChanged"));
- }
-
- public function set document(param1:Object) : void
- {
- var _loc2_:int = 0;
- var _loc3_:int = 0;
- var _loc4_:IUIComponent = null;
- _loc2_ = numChildren;
- _loc3_ = 0;
- while(_loc3_ < _loc2_)
- {
- _loc4_ = getChildAt(_loc3_) as IUIComponent;
- if(_loc4_)
- {
- if(_loc4_.document == mx_internal::_document || _loc4_.document == Application.application)
- {
- _loc4_.document = param1;
- }
- }
- _loc3_++;
- }
- mx_internal::_document = param1;
- }
-
- public function validateSize(param1:Boolean = false) : void
- {
- var _loc2_:int = 0;
- var _loc3_:DisplayObject = null;
- var _loc4_:Boolean = false;
- var _loc5_:IInvalidating = null;
- if(param1)
- {
- _loc2_ = 0;
- while(_loc2_ < numChildren)
- {
- _loc3_ = getChildAt(_loc2_);
- if(_loc3_ is ILayoutManagerClient)
- {
- (_loc3_ as ILayoutManagerClient).validateSize(true);
- }
- _loc2_++;
- }
- }
- if(mx_internal::invalidateSizeFlag)
- {
- _loc4_ = measureSizes();
- if((_loc4_) && includeInLayout)
- {
- invalidateDisplayList();
- _loc5_ = parent as IInvalidating;
- if(_loc5_)
- {
- _loc5_.invalidateSize();
- _loc5_.invalidateDisplayList();
- }
- }
- }
- }
-
- override public function dispatchEvent(param1:Event) : Boolean
- {
- if(mx_internal::dispatchEventHook != null)
- {
- mx_internal::dispatchEventHook(param1,this);
- }
- return super.dispatchEvent(param1);
- }
-
- public function set updateCompletePendingFlag(param1:Boolean) : void
- {
- _updateCompletePendingFlag = param1;
- }
-
- final mx_internal function get $height() : Number
- {
- return super.height;
- }
-
- override public function set height(param1:Number) : void
- {
- var _loc2_:IInvalidating = null;
- if(explicitHeight != param1)
- {
- explicitHeight = param1;
- invalidateSize();
- }
- if(mx_internal::_height != param1)
- {
- invalidateProperties();
- invalidateDisplayList();
- _loc2_ = parent as IInvalidating;
- if(Boolean(_loc2_) && includeInLayout)
- {
- _loc2_.invalidateSize();
- _loc2_.invalidateDisplayList();
- }
- mx_internal::_height = param1;
- dispatchEvent(new Event("heightChanged"));
- }
- }
-
- protected function attachOverlay() : void
- {
- addChild(mx_internal::overlay);
- }
-
- private function overlay_resizeHandler(param1:Event) : void
- {
- mx_internal::fillOverlay(mx_internal::overlay,mx_internal::overlayColor,null);
- }
-
- public function get numAutomationChildren() : int
- {
- if(automationDelegate)
- {
- return automationDelegate.numAutomationChildren;
- }
- return 0;
- }
-
- [Bindable("explictMinHeightChanged")]
- public function get explicitMinHeight() : Number
- {
- return mx_internal::_explicitMinHeight;
- }
-
- public function localToContent(param1:Point) : Point
- {
- return param1;
- }
-
- public function set id(param1:String) : void
- {
- _id = param1;
- }
-
- [Bindable("initialize")]
- public function get parentApplication() : Object
- {
- var _loc1_:Object = null;
- var _loc2_:UIComponent = null;
- _loc1_ = systemManager.document;
- if(_loc1_ == this)
- {
- _loc2_ = _loc1_.systemManager.parent as UIComponent;
- _loc1_ = !!_loc2_ ? _loc2_.systemManager.document : null;
- }
- return _loc1_;
- }
-
- private function removeState(param1:String, param2:String) : void
- {
- var _loc3_:State = null;
- var _loc4_:Array = null;
- var _loc5_:int = 0;
- _loc3_ = getState(param1);
- if(_loc3_)
- {
- _loc3_.mx_internal::dispatchExitState();
- _loc4_ = _loc3_.overrides;
- _loc5_ = int(_loc4_.length);
- while(_loc5_)
- {
- _loc4_[_loc5_ - 1].remove(this);
- _loc5_--;
- }
- if(_loc3_.basedOn != param2)
- {
- removeState(_loc3_.basedOn,param2);
- }
- }
- }
-
- public function setStyle(param1:String, param2:*) : void
- {
- var _loc3_:Boolean = false;
- var _loc4_:* = false;
- var _loc5_:* = false;
- if(param1 == "styleName")
- {
- styleName = param2;
- return;
- }
- if(EffectManager.mx_internal::getEventForEffectTrigger(param1) != "")
- {
- EffectManager.mx_internal::setStyle(param1,this);
- }
- _loc3_ = StyleManager.isInheritingStyle(param1);
- _loc4_ = inheritingStyles != UIComponent.mx_internal::STYLE_UNINITIALIZED;
- _loc5_ = getStyle(param1) != param2;
- if(!_styleDeclaration)
- {
- _styleDeclaration = new CSSStyleDeclaration();
- _styleDeclaration.mx_internal::setStyle(param1,param2);
- if(_loc4_)
- {
- regenerateStyleCache(_loc3_);
- }
- }
- else
- {
- _styleDeclaration.mx_internal::setStyle(param1,param2);
- }
- if(_loc4_ && _loc5_)
- {
- styleChanged(param1);
- notifyStyleChangeInChildren(param1,_loc3_);
- }
- }
-
- public function get validationSubField() : String
- {
- return _validationSubField;
- }
-
- public function get systemManager() : ISystemManager
- {
- var _loc1_:DisplayObject = null;
- var _loc2_:DisplayObjectContainer = null;
- var _loc3_:IUIComponent = null;
- if(!_systemManager)
- {
- _loc1_ = root;
- if(_loc1_)
- {
- _systemManager = _loc1_ as ISystemManager;
- }
- else
- {
- _loc2_ = parent;
- while(_loc2_)
- {
- _loc3_ = _loc2_ as IUIComponent;
- if(_loc3_)
- {
- _systemManager = _loc3_.systemManager;
- break;
- }
- _loc2_ = _loc2_.parent;
- }
- }
- }
- return _systemManager;
- }
-
- public function get showInAutomationHierarchy() : Boolean
- {
- return _showInAutomationHierarchy;
- }
-
- private function isBaseState(param1:String) : Boolean
- {
- return !param1 || param1 == "";
- }
-
- override public function addChildAt(param1:DisplayObject, param2:int) : DisplayObject
- {
- if(Boolean(mx_internal::overlayReferenceCount) && param1 != mx_internal::overlay)
- {
- param2 = Math.min(param2,Math.max(0,super.numChildren - 1));
- }
- mx_internal::addingChild(param1);
- mx_internal::$addChildAt(param1,param2);
- mx_internal::childAdded(param1);
- return param1;
- }
-
- public function set enabled(param1:Boolean) : void
- {
- _enabled = param1;
- cachedTextFormat = null;
- invalidateDisplayList();
- dispatchEvent(new Event("enabledChanged"));
- }
-
- [Bindable("explicitMinWidthChanged")]
- public function get minWidth() : Number
- {
- if(!isNaN(explicitMinWidth))
- {
- return explicitMinWidth;
- }
- return measuredMinWidth;
- }
-
- private function setFocusLater(param1:Event = null) : void
- {
- var _loc2_:ISystemManager = null;
- _loc2_ = systemManager;
- if(Boolean(_loc2_) && Boolean(_loc2_.stage))
- {
- _loc2_.stage.removeEventListener(Event.ENTER_FRAME,setFocusLater);
- if(UIComponentGlobals.mx_internal::nextFocusObject)
- {
- _loc2_.stage.focus = UIComponentGlobals.mx_internal::nextFocusObject;
- }
- UIComponentGlobals.mx_internal::nextFocusObject = null;
- }
- }
-
- [Bindable("currentStateChange")]
- public function get currentState() : String
- {
- return _currentStateChanged ? requestedCurrentState : _currentState;
- }
-
- public function set focusEnabled(param1:Boolean) : void
- {
- _focusEnabled = param1;
- }
-
- public function get measuredWidth() : Number
- {
- return _measuredWidth;
- }
-
- public function get baselinePosition() : Number
- {
- return NaN;
- }
-
- public function set cachePolicy(param1:String) : void
- {
- if(_cachePolicy != param1)
- {
- _cachePolicy = param1;
- if(param1 == UIComponentCachePolicy.OFF)
- {
- cacheAsBitmap = false;
- }
- else if(param1 == UIComponentCachePolicy.ON)
- {
- cacheAsBitmap = true;
- }
- else
- {
- cacheAsBitmap = cacheAsBitmapCount > 0;
- }
- }
- }
-
- public function get automationValue() : Array
- {
- if(automationDelegate)
- {
- return automationDelegate.automationValue;
- }
- return [];
- }
-
- public function set instanceIndices(param1:Array) : void
- {
- _instanceIndices = param1;
- }
-
- public function get repeaterIndex() : int
- {
- return !!_repeaterIndices ? int(_repeaterIndices[_repeaterIndices.length - 1]) : -1;
- }
-
- public function parentChanged(param1:DisplayObjectContainer) : void
- {
- if(!param1)
- {
- mx_internal::_parent = null;
- _nestLevel = 0;
- }
- else if(param1 is IStyleClient)
- {
- mx_internal::_parent = param1;
- }
- else if(param1 is SystemManager)
- {
- mx_internal::_parent = param1;
- }
- else
- {
- mx_internal::_parent = param1.parent;
- }
- }
-
- public function get owner() : DisplayObjectContainer
- {
- return !!_owner ? _owner : parent;
- }
-
- public function get processedDescriptors() : Boolean
- {
- return _processedDescriptors;
- }
-
- [Bindable("alphaChanged")]
- override public function set alpha(param1:Number) : void
- {
- super.alpha = param1;
- dispatchEvent(new Event("alphaChanged"));
- }
-
- public function initializeRepeaterArrays(param1:IRepeaterClient) : void
- {
- if(param1 && param1.instanceIndices && !_instanceIndices && !param1.isDocument)
- {
- _instanceIndices = param1.instanceIndices;
- _repeaters = param1.repeaters;
- _repeaterIndices = param1.repeaterIndices;
- }
- }
-
- [Bindable("explicitMaxWidthChanged")]
- public function get maxWidth() : Number
- {
- return !isNaN(explicitMaxWidth) ? explicitMaxWidth : DEFAULT_MAX_WIDTH;
- }
-
- private function removedHandler(param1:Event) : void
- {
- if(param1.eventPhase != EventPhase.AT_TARGET)
- {
- return;
- }
- if(parent is Container && Container(parent).mx_internal::creatingContentPane)
- {
- param1.stopImmediatePropagation();
- return;
- }
- }
-
- public function callLater(param1:Function, param2:Array = null) : void
- {
- var _loc3_:ISystemManager = null;
- methodQueue.push(new MethodQueueElement(param1,param2));
- _loc3_ = systemManager;
- if(Boolean(_loc3_) && Boolean(_loc3_.stage))
- {
- if(!listeningForRender)
- {
- _loc3_.stage.addEventListener(Event.RENDER,callLaterDispatcher);
- _loc3_.stage.addEventListener(Event.ENTER_FRAME,callLaterDispatcher);
- listeningForRender = true;
- }
- _loc3_.stage.invalidate();
- }
- }
-
- private function addedHandler(param1:Event) : void
- {
- if(param1.eventPhase != EventPhase.AT_TARGET)
- {
- return;
- }
- if(parent is Container && Container(parent).mx_internal::creatingContentPane)
- {
- param1.stopImmediatePropagation();
- return;
- }
- }
-
- public function get initialized() : Boolean
- {
- return _initialized;
- }
-
- private function callLaterDispatcher2(param1:Event) : void
- {
- var _loc2_:ISystemManager = null;
- var _loc3_:Array = null;
- var _loc4_:int = 0;
- var _loc5_:int = 0;
- var _loc6_:MethodQueueElement = null;
- if(UIComponentGlobals.mx_internal::callLaterSuspendCount > 0)
- {
- return;
- }
- _loc2_ = systemManager;
- if(_loc2_ && _loc2_.stage && listeningForRender)
- {
- _loc2_.stage.removeEventListener(Event.RENDER,callLaterDispatcher);
- _loc2_.stage.removeEventListener(Event.ENTER_FRAME,callLaterDispatcher);
- listeningForRender = false;
- }
- _loc3_ = methodQueue;
- methodQueue = [];
- _loc4_ = int(_loc3_.length);
- _loc5_ = 0;
- while(_loc5_ < _loc4_)
- {
- _loc6_ = MethodQueueElement(_loc3_[_loc5_]);
- _loc6_.method.apply(null,_loc6_.args);
- _loc5_++;
- }
- }
-
- public function measureHTMLText(param1:String) : TextLineMetrics
- {
- return determineTextFormatFromStyles().measureHTMLText(param1);
- }
-
- public function set descriptor(param1:UIComponentDescriptor) : void
- {
- mx_internal::_descriptor = param1;
- }
-
- private function getState(param1:String) : State
- {
- var _loc2_:int = 0;
- if(!states || isBaseState(param1))
- {
- return null;
- }
- _loc2_ = 0;
- while(_loc2_ < states.length)
- {
- if(states[_loc2_].name == param1)
- {
- return states[_loc2_];
- }
- _loc2_++;
- }
- if(resourceStateUndefined == null)
- {
- loadResources();
- }
- throw new ArgumentError(StringUtil.substitute(resourceStateUndefined,param1));
- }
-
- mx_internal function get documentDescriptor() : UIComponentDescriptor
- {
- return mx_internal::_documentDescriptor;
- }
-
- public function set includeInLayout(param1:Boolean) : void
- {
- var _loc2_:IInvalidating = null;
- if(_includeInLayout != param1)
- {
- _includeInLayout = param1;
- _loc2_ = parent as IInvalidating;
- if(_loc2_)
- {
- _loc2_.invalidateSize();
- _loc2_.invalidateDisplayList();
- }
- dispatchEvent(new Event("includeInLayoutChanged"));
- }
- }
-
- public function getClassStyleDeclarations() : Array
- {
- var myApplicationDomain:ApplicationDomain = null;
- var factory:IFlexModuleFactory = null;
- var className:String = null;
- var cache:Array = null;
- var decls:Array = null;
- var classNames:Array = null;
- var caches:Array = null;
- var declcache:Array = null;
- var myRoot:DisplayObject = null;
- var s:CSSStyleDeclaration = null;
- factory = ModuleManager.getAssociatedFactory(this);
- if(factory != null)
- {
- myApplicationDomain = ApplicationDomain(factory.info()["currentDomain"]);
- }
- else
- {
- myRoot = SystemManager.getSWFRoot(this);
- if(!myRoot)
- {
- return [];
- }
- myApplicationDomain = myRoot.loaderInfo.applicationDomain;
- }
- className = getQualifiedClassName(this);
- className = className.replace("::",".");
- cache = StyleManager.mx_internal::typeSelectorCache[className];
- if(cache)
- {
- return cache;
- }
- decls = [];
- classNames = [];
- caches = [];
- declcache = [];
- while(className != null && className != "mx.core.UIComponent" && className != "mx.core.UITextField")
- {
- cache = StyleManager.mx_internal::typeSelectorCache[className];
- if(cache)
- {
- decls = decls.concat(cache);
- break;
- }
- s = StyleManager.getStyleDeclaration(className);
- if(s)
- {
- decls.unshift(s);
- classNames.push(className);
- caches.push(classNames);
- declcache.push(decls);
- decls = [];
- classNames = [];
- }
- else
- {
- classNames.push(className);
- }
- try
- {
- className = getQualifiedSuperclassName(myApplicationDomain.getDefinition(className));
- className = className.replace("::",".");
- }
- catch(e:ReferenceError)
- {
- className = null;
- }
- }
- caches.push(classNames);
- declcache.push(decls);
- decls = [];
- while(caches.length)
- {
- classNames = caches.pop();
- decls = decls.concat(declcache.pop());
- while(classNames.length)
- {
- StyleManager.mx_internal::typeSelectorCache[classNames.pop()] = decls;
- }
- }
- return decls;
- }
-
- public function validateProperties() : void
- {
- if(mx_internal::invalidatePropertiesFlag)
- {
- commitProperties();
- mx_internal::invalidatePropertiesFlag = false;
- }
- }
-
- public function set measuredMinWidth(param1:Number) : void
- {
- _measuredMinWidth = param1;
- }
-
- override public function removeChild(param1:DisplayObject) : DisplayObject
- {
- mx_internal::removingChild(param1);
- mx_internal::$removeChild(param1);
- mx_internal::childRemoved(param1);
- return param1;
- }
-
- private function initializeState(param1:String) : void
- {
- var _loc2_:State = null;
- _loc2_ = getState(param1);
- while(_loc2_)
- {
- _loc2_.mx_internal::initialize();
- _loc2_ = getState(_loc2_.basedOn);
- }
- }
-
- private function focusObj_moveHandler(param1:MoveEvent) : void
- {
- adjustFocusRect();
- }
-
- public function get styleDeclaration() : CSSStyleDeclaration
- {
- return _styleDeclaration;
- }
-
- override public function get doubleClickEnabled() : Boolean
- {
- return super.doubleClickEnabled;
- }
-
- mx_internal function initProtoChain() : void
- {
- var _loc1_:CSSStyleDeclaration = null;
- var _loc2_:Object = null;
- var _loc3_:IStyleClient = null;
- var _loc4_:Array = null;
- var _loc5_:int = 0;
- var _loc6_:int = 0;
- var _loc7_:Object = null;
- var _loc8_:CSSStyleDeclaration = null;
- if(styleName)
- {
- if(styleName is CSSStyleDeclaration)
- {
- _loc1_ = CSSStyleDeclaration(styleName);
- }
- else
- {
- if(styleName is IFlexDisplayObject)
- {
- StyleProtoChain.initProtoChainForUIComponentStyleName(this);
- return;
- }
- if(styleName is String)
- {
- _loc1_ = StyleManager.getStyleDeclaration("." + styleName);
- }
- }
- }
- _loc2_ = StyleManager.mx_internal::stylesRoot;
- if(Boolean(_loc2_) && Boolean(_loc2_.effects))
- {
- registerEffects(_loc2_.effects);
- }
- _loc3_ = parent as IStyleClient;
- if(_loc3_)
- {
- _loc7_ = _loc3_.inheritingStyles;
- if(_loc7_ == UIComponent.mx_internal::STYLE_UNINITIALIZED)
- {
- _loc7_ = _loc2_;
- }
- }
- else if(isPopUp)
- {
- _loc7_ = Application.application.inheritingStyles;
- }
- else
- {
- _loc7_ = StyleManager.mx_internal::stylesRoot;
- }
- _loc4_ = getClassStyleDeclarations();
- _loc5_ = int(_loc4_.length);
- _loc6_ = 0;
- while(_loc6_ < _loc5_)
- {
- _loc8_ = _loc4_[_loc6_];
- _loc7_ = _loc8_.mx_internal::addStyleToProtoChain(_loc7_,this);
- _loc2_ = _loc8_.mx_internal::addStyleToProtoChain(_loc2_,this);
- if(_loc8_.mx_internal::effects)
- {
- registerEffects(_loc8_.mx_internal::effects);
- }
- _loc6_++;
- }
- if(_loc1_)
- {
- _loc7_ = _loc1_.mx_internal::addStyleToProtoChain(_loc7_,this);
- _loc2_ = _loc1_.mx_internal::addStyleToProtoChain(_loc2_,this);
- if(_loc1_.mx_internal::effects)
- {
- registerEffects(_loc1_.mx_internal::effects);
- }
- }
- inheritingStyles = !!_styleDeclaration ? _styleDeclaration.mx_internal::addStyleToProtoChain(_loc7_,this) : _loc7_;
- nonInheritingStyles = !!_styleDeclaration ? _styleDeclaration.mx_internal::addStyleToProtoChain(_loc2_,this) : _loc2_;
- }
-
- public function get repeaterIndices() : Array
- {
- return !!_repeaterIndices ? _repeaterIndices.slice() : [];
- }
-
- private function creationCompleteHandler(param1:FlexEvent) : void
- {
- if(_currentStateChanged)
- {
- _currentStateChanged = false;
- commitCurrentState();
- validateNow();
- }
- removeEventListener(FlexEvent.CREATION_COMPLETE,creationCompleteHandler);
- }
-
- override public function setChildIndex(param1:DisplayObject, param2:int) : void
- {
- if(Boolean(mx_internal::overlayReferenceCount) && param1 != mx_internal::overlay)
- {
- param2 = Math.min(param2,Math.max(0,super.numChildren - 2));
- }
- super.setChildIndex(param1,param2);
- }
-
- public function set measuredHeight(param1:Number) : void
- {
- _measuredHeight = param1;
- }
-
- protected function createChildren() : void
- {
- }
-
- public function regenerateStyleCache(param1:Boolean) : void
- {
- var _loc2_:IChildList = null;
- var _loc3_:int = 0;
- var _loc4_:int = 0;
- var _loc5_:DisplayObject = null;
- mx_internal::initProtoChain();
- _loc2_ = this is IRawChildrenContainer ? IRawChildrenContainer(this).rawChildren : IChildList(this);
- _loc3_ = _loc2_.numChildren;
- _loc4_ = 0;
- while(_loc4_ < _loc3_)
- {
- _loc5_ = _loc2_.getChildAt(_loc4_);
- if(_loc5_ is IStyleClient)
- {
- if(IStyleClient(_loc5_).inheritingStyles != UIComponent.mx_internal::STYLE_UNINITIALIZED)
- {
- IStyleClient(_loc5_).regenerateStyleCache(param1);
- }
- }
- else if(_loc5_ is UITextField)
- {
- if(UITextField(_loc5_).inheritingStyles)
- {
- StyleProtoChain.initTextField(UITextField(_loc5_));
- }
- }
- _loc4_++;
- }
- }
-
- public function get updateCompletePendingFlag() : Boolean
- {
- return _updateCompletePendingFlag;
- }
-
- protected function focusOutHandler(param1:FocusEvent) : void
- {
- if(isOurFocus(DisplayObject(param1.target)))
- {
- drawFocus(false);
- }
- }
-
- public function contentToLocal(param1:Point) : Point
- {
- return param1;
- }
-
- public function getFocus() : InteractiveObject
- {
- var _loc1_:ISystemManager = null;
- _loc1_ = systemManager;
- if(!_loc1_)
- {
- return null;
- }
- if(UIComponentGlobals.mx_internal::nextFocusObject)
- {
- return UIComponentGlobals.mx_internal::nextFocusObject;
- }
- return _loc1_.stage.focus;
- }
-
- public function endEffectsStarted() : void
- {
- var _loc1_:int = 0;
- var _loc2_:int = 0;
- _loc1_ = int(mx_internal::_effectsStarted.length);
- _loc2_ = 0;
- while(_loc2_ < _loc1_)
- {
- mx_internal::_effectsStarted[_loc2_].end();
- _loc2_++;
- }
- }
-
- protected function get unscaledHeight() : Number
- {
- return height / Math.abs(scaleY);
- }
-
- [Bindable("enabledChanged")]
- public function get enabled() : Boolean
- {
- return _enabled;
- }
-
- override public function set cacheAsBitmap(param1:Boolean) : void
- {
- super.cacheAsBitmap = param1;
- cacheAsBitmapCount = param1 ? 1 : 0;
- }
-
- public function get focusEnabled() : Boolean
- {
- return _focusEnabled;
- }
-
- mx_internal function removeOverlay() : void
- {
- if(mx_internal::overlayReferenceCount > 0 && --mx_internal::overlayReferenceCount == 0 && Boolean(mx_internal::overlay))
- {
- removeEventListener("resize",overlay_resizeHandler);
- if(super.getChildByName("overlay"))
- {
- mx_internal::$removeChild(mx_internal::overlay);
- }
- mx_internal::overlay = null;
- }
- }
-
- public function set cacheHeuristic(param1:Boolean) : void
- {
- if(_cachePolicy == UIComponentCachePolicy.AUTO)
- {
- if(param1)
- {
- ++cacheAsBitmapCount;
- }
- else if(cacheAsBitmapCount != 0)
- {
- --cacheAsBitmapCount;
- }
- super.cacheAsBitmap = cacheAsBitmapCount != 0;
- }
- }
-
- public function get cachePolicy() : String
- {
- return _cachePolicy;
- }
-
- public function set maxHeight(param1:Number) : void
- {
- if(explicitMaxHeight == param1)
- {
- return;
- }
- explicitMaxHeight = param1;
- }
-
- public function set focusManager(param1:IFocusManager) : void
- {
- _focusManager = param1;
- }
-
- public function clearStyle(param1:String) : void
- {
- setStyle(param1,undefined);
- }
-
- public function get descriptor() : UIComponentDescriptor
- {
- return mx_internal::_descriptor;
- }
-
- public function set nonInheritingStyles(param1:Object) : void
- {
- _nonInheritingStyles = param1;
- }
-
- public function set automationDelegate(param1:Object) : void
- {
- _automationDelegate = param1 as IAutomationObject;
- }
-
- public function get measuredMinWidth() : Number
- {
- return _measuredMinWidth;
- }
-
- public function createReferenceOnParentDocument(param1:IFlexDisplayObject) : void
- {
- var _loc2_:Array = null;
- var _loc3_:Object = null;
- var _loc4_:int = 0;
- var _loc5_:int = 0;
- var _loc6_:PropertyChangeEvent = null;
- var _loc7_:Object = null;
- if(Boolean(id) && id != "")
- {
- _loc2_ = _instanceIndices;
- if(!_loc2_)
- {
- param1[id] = this;
- }
- else
- {
- _loc3_ = param1[id];
- if(!(_loc3_ is Array))
- {
- _loc3_ = param1[id] = [];
- }
- _loc4_ = int(_loc2_.length);
- _loc5_ = 0;
- while(_loc5_ < _loc4_ - 1)
- {
- _loc7_ = _loc3_[_loc2_[_loc5_]];
- if(!(_loc7_ is Array))
- {
- _loc7_ = _loc3_[_loc2_[_loc5_]] = [];
- }
- _loc3_ = _loc7_;
- _loc5_++;
- }
- _loc3_[_loc2_[_loc4_ - 1]] = this;
- _loc6_ = PropertyChangeEvent.createUpdateEvent(param1,id,param1[id],param1[id]);
- param1.dispatchEvent(_loc6_);
- }
- }
- }
-
- public function set isPopUp(param1:Boolean) : void
- {
- _isPopUp = param1;
- }
-
- override public function set width(param1:Number) : void
- {
- var _loc2_:IInvalidating = null;
- if(explicitWidth != param1)
- {
- explicitWidth = param1;
- invalidateSize();
- }
- if(mx_internal::_width != param1)
- {
- invalidateProperties();
- invalidateDisplayList();
- _loc2_ = parent as IInvalidating;
- if(Boolean(_loc2_) && includeInLayout)
- {
- _loc2_.invalidateSize();
- _loc2_.invalidateDisplayList();
- }
- mx_internal::_width = param1;
- dispatchEvent(new Event("widthChanged"));
- }
- }
-
- public function get measuredHeight() : Number
- {
- return _measuredHeight;
- }
-
- public function get repeater() : IRepeater
- {
- return !!_repeaters ? _repeaters[_repeaters.length - 1] : null;
- }
-
- public function initialize() : void
- {
- if(initialized)
- {
- return;
- }
- dispatchEvent(new FlexEvent(FlexEvent.PREINITIALIZE));
- createChildren();
- childrenCreated();
- initializeAccessibility();
- initializationComplete();
- }
-
- public function set percentHeight(param1:Number) : void
- {
- var _loc2_:IInvalidating = null;
- if(_percentHeight == param1)
- {
- return;
- }
- if(!isNaN(param1))
- {
- _explicitHeight = NaN;
- }
- _percentHeight = param1;
- _loc2_ = parent as IInvalidating;
- if(_loc2_)
- {
- _loc2_.invalidateSize();
- _loc2_.invalidateDisplayList();
- }
- }
-
- final mx_internal function set $visible(param1:Boolean) : void
- {
- super.visible = param1;
- }
-
- protected function initializeAccessibility() : void
- {
- if(UIComponent.mx_internal::createAccessibilityImplementation != null)
- {
- UIComponent.mx_internal::createAccessibilityImplementation(this);
- }
- }
-
- private function findCommonBaseState(param1:String, param2:String) : String
- {
- var _loc3_:State = null;
- var _loc4_:State = null;
- var _loc5_:Array = null;
- var _loc6_:Array = null;
- var _loc7_:String = null;
- _loc3_ = getState(param1);
- _loc4_ = getState(param2);
- if(!_loc3_ || !_loc4_)
- {
- return "";
- }
- if(isBaseState(_loc3_.basedOn) || isBaseState(_loc4_.basedOn))
- {
- return "";
- }
- _loc5_ = getBaseStates(_loc3_);
- _loc6_ = getBaseStates(_loc4_);
- _loc7_ = "";
- while(_loc5_[_loc5_.length] == _loc6_[_loc6_.length])
- {
- _loc7_ = _loc5_.pop();
- _loc6_.pop();
- if(!_loc5_.length || !_loc6_.length)
- {
- break;
- }
- }
- return _loc7_;
- }
-
- mx_internal function childRemoved(param1:DisplayObject) : void
- {
- if(param1 is IUIComponent)
- {
- if(IUIComponent(param1).document != param1)
- {
- IUIComponent(param1).document = null;
- }
- IUIComponent(param1).parentChanged(null);
- }
- }
-
- final mx_internal function $removeChildAt(param1:int) : DisplayObject
- {
- return super.removeChildAt(param1);
- }
-
- [Bindable("explicitMaxHeightChanged")]
- public function get maxHeight() : Number
- {
- return !isNaN(explicitMaxHeight) ? explicitMaxHeight : DEFAULT_MAX_HEIGHT;
- }
-
- public function get focusManager() : IFocusManager
- {
- var _loc1_:DisplayObject = null;
- if(_focusManager)
- {
- return _focusManager;
- }
- _loc1_ = parent;
- while(_loc1_)
- {
- if(_loc1_ is IFocusManagerContainer)
- {
- return IFocusManagerContainer(_loc1_).focusManager;
- }
- _loc1_ = _loc1_.parent;
- }
- return null;
- }
-
- public function set styleName(param1:Object) : void
- {
- if(_styleName === param1)
- {
- return;
- }
- _styleName = param1;
- if(inheritingStyles == UIComponent.mx_internal::STYLE_UNINITIALIZED)
- {
- return;
- }
- regenerateStyleCache(true);
- mx_internal::initThemeColor();
- styleChanged("styleName");
- notifyStyleChangeInChildren("styleName",true);
- }
-
- public function get automationDelegate() : Object
- {
- return _automationDelegate;
- }
-
- public function set explicitMaxHeight(param1:Number) : void
- {
- var _loc2_:IInvalidating = null;
- if(mx_internal::_explicitMaxHeight == param1)
- {
- return;
- }
- mx_internal::_explicitMaxHeight = param1;
- invalidateSize();
- _loc2_ = parent as IInvalidating;
- if(_loc2_)
- {
- _loc2_.invalidateSize();
- _loc2_.invalidateDisplayList();
- }
- dispatchEvent(new Event("explicitMaxHeightChanged"));
- }
-
- mx_internal function cancelAllCallLaters() : void
- {
- var _loc1_:ISystemManager = null;
- _loc1_ = systemManager;
- if(Boolean(_loc1_) && Boolean(_loc1_.stage))
- {
- if(listeningForRender)
- {
- _loc1_.stage.removeEventListener(Event.RENDER,callLaterDispatcher);
- _loc1_.stage.removeEventListener(Event.ENTER_FRAME,callLaterDispatcher);
- listeningForRender = false;
- }
- }
- methodQueue.splice(0);
- }
-
- private function updateCompleteHandler(param1:Event) : void
- {
- UIComponentGlobals.mx_internal::layoutManager.removeEventListener(FlexEvent.UPDATE_COMPLETE,updateCompleteHandler);
- processEffectFinished(_endingEffectInstances);
- _endingEffectInstances = [];
- }
-
- public function styleChanged(param1:String) : void
- {
- if(!param1 || param1 == "styleName" || StyleManager.isSizeInvalidatingStyle(param1))
- {
- invalidateSize();
- }
- if(!param1 || param1 == "styleName" || param1 == "themeColor")
- {
- mx_internal::initThemeColor();
- }
- invalidateDisplayList();
- if(parent is IInvalidating)
- {
- if(StyleManager.isParentSizeInvalidatingStyle(param1))
- {
- IInvalidating(parent).invalidateSize();
- }
- if(StyleManager.isParentDisplayListInvalidatingStyle(param1))
- {
- IInvalidating(parent).invalidateDisplayList();
- }
- }
- }
-
- final mx_internal function get $visible() : Boolean
- {
- return super.visible;
- }
-
- public function drawRoundRect(param1:Number, param2:Number, param3:Number, param4:Number, param5:Object = null, param6:Object = null, param7:Object = null, param8:Object = null, param9:String = null, param10:Array = null, param11:Object = null) : void
- {
- var _loc12_:Graphics = null;
- var _loc13_:Number = NaN;
- var _loc14_:Array = null;
- var _loc15_:Matrix = null;
- var _loc16_:Object = null;
- _loc12_ = graphics;
- if(!param3 || !param4)
- {
- return;
- }
- if(param6 !== null)
- {
- if(param6 is Array)
- {
- if(param7 is Array)
- {
- _loc14_ = param7 as Array;
- }
- else
- {
- _loc14_ = [param7,param7];
- }
- if(!param10)
- {
- param10 = [0,255];
- }
- _loc15_ = null;
- if(param8)
- {
- if(param8 is Matrix)
- {
- _loc15_ = Matrix(param8);
- }
- else
- {
- _loc15_ = new Matrix();
- if(param8 is Number)
- {
- _loc15_.createGradientBox(param3,param4,Number(param8) * Math.PI / 180,param1,param2);
- }
- else
- {
- _loc15_.createGradientBox(param8.w,param8.h,param8.r,param8.x,param8.y);
- }
- }
- }
- if(param9 == GradientType.RADIAL)
- {
- _loc12_.beginGradientFill(GradientType.RADIAL,param6 as Array,_loc14_,param10,_loc15_);
- }
- else
- {
- _loc12_.beginGradientFill(GradientType.LINEAR,param6 as Array,_loc14_,param10,_loc15_);
- }
- }
- else
- {
- _loc12_.beginFill(Number(param6),Number(param7));
- }
- }
- if(!param5)
- {
- _loc12_.drawRect(param1,param2,param3,param4);
- }
- else if(param5 is Number)
- {
- _loc13_ = Number(param5) * 2;
- _loc12_.drawRoundRect(param1,param2,param3,param4,_loc13_,_loc13_);
- }
- else
- {
- GraphicsUtil.drawRoundRectComplex(_loc12_,param1,param2,param3,param4,param5.tl,param5.tr,param5.bl,param5.br);
- }
- if(param11)
- {
- _loc16_ = param11.r;
- if(_loc16_ is Number)
- {
- _loc13_ = Number(_loc16_) * 2;
- _loc12_.drawRoundRect(param11.x,param11.y,param11.w,param11.h,_loc13_,_loc13_);
- }
- else
- {
- GraphicsUtil.drawRoundRectComplex(_loc12_,param11.x,param11.y,param11.w,param11.h,_loc16_.tl,_loc16_.tr,_loc16_.bl,_loc16_.br);
- }
- }
- if(param6 !== null)
- {
- _loc12_.endFill();
- }
- }
-
- public function move(param1:Number, param2:Number) : void
- {
- var _loc3_:Boolean = false;
- _loc3_ = false;
- if(param1 != super.x)
- {
- super.x = param1;
- dispatchEvent(new Event("xChanged"));
- _loc3_ = true;
- }
- if(param2 != super.y)
- {
- super.y = param2;
- dispatchEvent(new Event("yChanged"));
- _loc3_ = true;
- }
- if(_loc3_)
- {
- dispatchMoveEvent();
- }
- }
-
- public function set toolTip(param1:String) : void
- {
- ToolTipManager.mx_internal::registerToolTip(this,param1);
- _toolTip = param1;
- dispatchEvent(new Event("toolTipChanged"));
- }
-
- public function set repeaters(param1:Array) : void
- {
- _repeaters = param1;
- }
-
- [Bindable("explicitMaxHeightChanged")]
- public function get explicitMaxHeight() : Number
- {
- return mx_internal::_explicitMaxHeight;
- }
-
- public function get styleName() : Object
- {
- return _styleName;
- }
-
- private function loadResources() : void
- {
- resourceStateUndefined = packageResources.getString("stateUndefined");
- }
-
- public function set explicitWidth(param1:Number) : void
- {
- var _loc2_:IInvalidating = null;
- if(_explicitWidth == param1)
- {
- return;
- }
- if(!isNaN(param1))
- {
- _percentWidth = NaN;
- }
- _explicitWidth = param1;
- invalidateSize();
- _loc2_ = parent as IInvalidating;
- if(Boolean(_loc2_) && includeInLayout)
- {
- _loc2_.invalidateSize();
- _loc2_.invalidateDisplayList();
- }
- dispatchEvent(new Event("explicitWidthChanged"));
- }
-
- [Bindable("initialize")]
- public function get parentDocument() : Object
- {
- var _loc1_:IUIComponent = null;
- var _loc2_:ISystemManager = null;
- if(document == this)
- {
- _loc1_ = parent as IUIComponent;
- if(_loc1_)
- {
- return _loc1_.document;
- }
- _loc2_ = parent as ISystemManager;
- if(_loc2_)
- {
- return _loc2_.document;
- }
- return null;
- }
- return document;
- }
-
- public function set measuredMinHeight(param1:Number) : void
- {
- _measuredMinHeight = param1;
- }
-
- protected function childrenCreated() : void
- {
- invalidateProperties();
- invalidateSize();
- invalidateDisplayList();
- }
-
- private function setBorderColorForErrorString() : void
- {
- var _loc1_:IFocusManager = null;
- var _loc2_:DisplayObject = null;
- if(!_errorString || _errorString.length == 0)
- {
- setStyle("borderColor",mx_internal::origBorderColor);
- mx_internal::saveBorderColor = true;
- }
- else
- {
- if(mx_internal::saveBorderColor)
- {
- mx_internal::saveBorderColor = false;
- mx_internal::origBorderColor = getStyle("borderColor");
- }
- setStyle("borderColor",getStyle("errorColor"));
- }
- styleChanged("themeColor");
- _loc1_ = focusManager;
- _loc2_ = !!_loc1_ ? DisplayObject(_loc1_.getFocus()) : null;
- if(_loc1_ && _loc1_.showFocusIndicator && _loc2_ == this)
- {
- drawFocus(true);
- }
- }
-
- public function measureText(param1:String) : TextLineMetrics
- {
- return determineTextFormatFromStyles().measureText(param1);
- }
-
- [Bindable("explicitWidthChanged")]
- public function get explicitWidth() : Number
- {
- return _explicitWidth;
- }
-
- public function invalidateSize() : void
- {
- if(!mx_internal::invalidateSizeFlag)
- {
- mx_internal::invalidateSizeFlag = true;
- if(Boolean(parent) && Boolean(UIComponentGlobals.mx_internal::layoutManager))
- {
- UIComponentGlobals.mx_internal::layoutManager.invalidateSize(this);
- }
- }
- }
-
- override public function set filters(param1:Array) : void
- {
- var _loc2_:int = 0;
- var _loc3_:int = 0;
- var _loc4_:IEventDispatcher = null;
- if(_filters)
- {
- _loc2_ = int(_filters.length);
- _loc3_ = 0;
- while(_loc3_ < _loc2_)
- {
- _loc4_ = _filters[_loc3_] as IEventDispatcher;
- if(_loc4_)
- {
- _loc4_.removeEventListener("change",filterChangeHandler);
- }
- _loc3_++;
- }
- }
- _filters = param1;
- if(_filters)
- {
- _loc2_ = int(_filters.length);
- _loc3_ = 0;
- while(_loc3_ < _loc2_)
- {
- _loc4_ = _filters[_loc3_] as IEventDispatcher;
- if(_loc4_)
- {
- _loc4_.addEventListener("change",filterChangeHandler);
- }
- _loc3_++;
- }
- }
- super.filters = _filters;
- }
-
- protected function updateDisplayList(param1:Number, param2:Number) : void
- {
- }
-
- override public function get filters() : Array
- {
- return !!_filters ? _filters : super.filters;
- }
- }
- }
-
- class MethodQueueElement
- {
- public var method:Function;
-
- public var args:Array;
-
- public function MethodQueueElement(param1:Function, param2:Array = null)
- {
- super();
- this.method = param1;
- this.args = param2;
- }
- }
-